note 46272 added to function.chdir
| From: | dexter at debian dot org | Date: | Tue, 05 Oct 2004 11:18:59 +0000 |
| Subject: | note 46272 added to function.chdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78017@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.chdir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46272
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46272&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46272&report=yes
Search -- http://master.php.net/manage/user-notes.php