[TYPO3-dev] update reference using php-cli?

Bernhard Kraft kraftb at kraftb.at
Thu May 18 19:30:47 CEST 2006


Tonni Aagesen wrote:

> - define('PATH_thisScript',$_ENV['_']?$_ENV['_']:$_SERVER['_']);
> + define('PATH_thisScript',$_ENV['PWD']?$_ENV['PWD']:$_SERVER['PWD']);

I already complained about that some times ... in my opinion the only portable way
is:


> + define('PATH_thisScript', __FILE__);

__FILE__ is an automatically defined constant ... it works for PHP3/4/5 ...

And it really returns what the variable is called the path of "THIS" script ... so
if you do this in an included file it will return the path of the included file ..

always the path of itself.


greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]




More information about the TYPO3-dev mailing list