I have a script that I wrote that does some maintenance. I called it regularly using a cron job to fetch the url: (fetch http://www.myserver.com/script.php).
I'm making some changes and am now doing it like this:
/usr/local/bin/php /path/to/my/script.php
Now, the script will usually be called this way, BUT on occasion I will need to call it by hand.
I'd like to change the line feeds from \n to <br> depending on whether it's run locall or through a page request.
I can't seem to find any documentation on determining what environment PHP is running in. I'm sure it's something easy like "IsShell()" or something...
Help? Thanks!
I'm making some changes and am now doing it like this:
/usr/local/bin/php /path/to/my/script.php
Now, the script will usually be called this way, BUT on occasion I will need to call it by hand.
I'd like to change the line feeds from \n to <br> depending on whether it's run locall or through a page request.
I can't seem to find any documentation on determining what environment PHP is running in. I'm sure it's something easy like "IsShell()" or something...
Help? Thanks!