motorpsychkill <mailto:[EMAIL PROTECTED]>
    on Tuesday, March 23, 2004 4:51 PM said:

> So no matter what file I use (like rabbits.php) and I include
> config.php, CONFIG_FILE_URL will always return the url for the config
> file and NOT the file doing the calling (rabbits.php).

hmm... the only thing i can think of is to build it myself.

<?php

function file_url($file)
{
        $url_base = "http://localhost/";;
        $server_base = "c:\htdocs\";

      return str_replace($server_base, $url_base, $file);
}

echo file_url(__FILE__);

?>

untested but i think you get the picture.



chris.

p.s. i would define $url_base and $server_base within a constants file
that is included somewhere.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to