Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
September 8, 2004, 5:54 pm
rate this thread
I'm running a PHP script from a shell (bash, ...) - not from a web
So I use a script of the form:
and then I can run the script directly, rather than:
[user]# php -f script_name
Running the script this way changes the current directory to that of
I don't want this behaviour - I want the current directory to be from
where I run the script, so I can write the PHP code to work on 'local'
files (./*) - just like it should for CLI SAPI interface.
I can't use the -C option (PHP throws an error) like:
#!/usr/bin/php -q -C
Anyone know how to do what I want ?
System: Linux Fedora Core 1, PHP Version 4.3.8