Running CLI from a web page
| From: | Ron Rudman | Date: | Mon, 10 Nov 2003 12:53:06 +0000 |
| Subject: | Running CLI from a web page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169025@lists.php.net to get a copy of this message | ||
I have a php cli that creates a file. It works fine when I execute it from
the Linux command line as "php foo > bar". I'm trying to also execute this
by clicking a form button on a web page via "system('php foo > bar')". I
can see that the file bar gets created but it's always empty. I've tried
executing "system('php foo')" (directly to STDOUT) but get no output. I've
tried "exec('php foo',$output)" but there's nothing in the array when
it's
done.
Suggestions???
BTW, wherever I've written "php" above I've actually used the full path of
the php executable.