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.  But...I would also like to run this report on demand from within a
web application.  It seemed "obvious" that all I'd have to do was execute my
command line via the system/exec/passthru type of function.

I can't see how I would use eval() here, since in the command line:  "php
foo", foo is a file.  A possibility here, however, is to use "include foo".
The only reason I didn't want to do that is because then the code in foo
might conflict with the context surrounding the include.  I was hoping for a
simpler solution, but I might be able to isolate the include in a function.



"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- Ron Rudman <[EMAIL PROTECTED]> wrote:
> > There are already plenty of echo statements in foo!  They DO show up
> > when I run php foo. It's when I try to use system("php foo") that I
> > don't get anything.
>
> I missed the original question, but why are you trying to use the PHP CLI
> from within PHP itself? Can you perhaps use eval() instead?
>
> http://www.php.net/eval
>
> 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

Reply via email to