Hello.
Here is a patch for the command-line version of PHP which makes it chdir()
to the
script directory just like the web version of PHP does. It also implements
the -C
option which has been a NOOP up to now.
diff -ruN php5-200308051930.orig/sapi/cli/php_cli.c
php5-200308051930/sapi/cli/php_cli.
Hello Vesselin,
Tuesday, August 5, 2003, 10:47:53 PM, you wrote:
VA> Hello.
VA> Here is a patch for the command-line version of PHP which makes it chdir()
VA> to the
VA> script directory just like the web version of PHP does. It also implements
VA> the -C
VA> option which has been a NOOP up to no
Hello.
>No need for that. CLI was specifically designed not to chdir to scripts
>directory. If you want that one liner would solve it for you:
>
>chdir(dirname(__FILE__));
My scripts usually begin with a few require'd libraries, so it makes the code cleaner
if it begins with a few require sta
> Hello Vesselin,
>
> Tuesday, August 5, 2003, 10:47:53 PM, you wrote:
>
> VA> Hello.
> VA> Here is a patch for the command-line version of PHP which makes it
chdir()
> VA> to the
> VA> script directory just like the web version of PHP does. It also
implements
> VA> the -C
> VA> option which has be