Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write PHP standard output on a text file?

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi.

Using PHP 4.3.11, I want my script not to write standard output on the webpage, but
on a textfile.

I tried with:

Code:
$variableName = 44;
system("/usr/local/php/bin/php /home/foo/script.php > /home/foo/file.txt", $retval);

But '/home/foo/script.php' doesn't consider $variableName.

Is there any way to call '/home/foo/script.php' and make it to write standard output
on a textfile?

Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top