|
Posted by NC on 02/17/06 20:00
Ridge Burner wrote:
>
> Does PHP handle included files differently for CLI and HTTP?
Not exactly; the issue is that of the current working directory. When
runing as an Apache module, PHP changes the working directory to the
one in which the script is located. The command-line interpreter,
however, makes no such switch.
> I have a cron that triggers a script daily, this script has
> an include like so:
> include '../includes/myScript.php';
>
> When this script is run from Browser, it works fine, and the
> file is included.
> When the corn triggers it, the include is not executed.
>
> I have changed the include to the full path instead of relative
> one, but will not know if this fixes it until tomorrow.
It probably does.
Cheers,
NC
[Back to original message]
|