note 46272 deleted from function.chdir by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 06 Oct 2004 19:46:48 +0000 |
| Subject: | note 46272 deleted from function.chdir by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78091@lists.php.net to get a copy of this message | ||
Note Submitter: dexter at debian dot org
----
If you want to run script with PHP in CLI mode, you have to know the PHP in this mode doesn't
change current directory. So you can add
<? chdir(dirname(__FILE__)); ?>
at the begining of the script to change cwd to the script's directory as it is working in CGI
mode.