On Oct 31, 2007, at 1:02 PM, Alex Tingle wrote: > Does anyone know of an easy way to auto-detect the installation > directory? Try this: preg_replace ("|^.*(/wp-content/plugins/.*/).*$|", "$1",__FILE__) Chris