--- Ron Rudman <[EMAIL PROTECTED]> wrote: > I have a report that I would like to run as a cron job, hence the > need for a standalone CLI version that just reads the database and > has no other context.
[snip] > I can't see how I would use eval() here, since in the command line: > "php foo", foo is a file. You could make your script foo smart enough to tell if it is being run from the command line or being interpreted by the Web server. If the path to foo presents a challenge, you could use the full path. Command-line parameters can be read in in different ways depending on how the script is called. Aside from that, you can probably just include foo in order to execute it, or you could read it in as a file and eval() whatever part of it you want to (maybe to strip of the #! at the beginning). I'm not sure if any of this seems reasonable for your situation, but it seems like something would be better/easier than executing the PHP CLI from within PHP. Hope that helps. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php