note 71217 added to function.include
| From: | rickkyREMOVETHIS at gmail dot com | Date: | Thu, 16 Nov 2006 21:03:04 +0000 |
| Subject: | note 71217 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119817@lists.php.net to get a copy of this message | ||
In response to http://uk.php.net/manual/en/function.include.php#38000
Using the following at the top of your CLI scripts will make includes work similar to web PHP.
#!/usr/bin/php
<?php chdir(dirname(__FILE__)); ?>
This changes the current working directory to the one your script is running in. Its quite used for
taking existing web scripts and getting them to run quickly in the command line.
----
Server IP: 85.116.0.130
Probable Submitter: 80.229.31.225
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- https://master.php.net/note/edit/71217
Del: integrated -- https://master.php.net/note/delete/71217/integrated
Del: useless -- https://master.php.net/note/delete/71217/useless
Del: bad code -- https://master.php.net/note/delete/71217/bad+code
Del: spam -- https://master.php.net/note/delete/71217/spam
Del: non-english -- https://master.php.net/note/delete/71217/non-english
Del: in docs -- https://master.php.net/note/delete/71217/in+docs
Del: other reasons-- https://master.php.net/note/delete/71217
Reject -- https://master.php.net/note/reject/71217
Search -- https://master.php.net/manage/user-notes.php