How to run a shell script in PHP(windows)

A

Anonymous

Guest
===============

Hi all,
I am using PHP in Windows XP.I want to run a script which generates an output file, using System function.How can I implement it?
I have tried in the following way(And open the php page using IE.).
I have configured PHP and Cygwin on windows machine.
for example:
system ('echo "I like PHP" > output' ,$retval);
It is not creating any file.
But if i do like " system ('secho "I like PHP"',$retval); " then it is printing fine on IE.
Can you please guide me.
Thanks in advance,
Uday.
===============
 
The fact that output isn't created, could be a permission problem. Check that the webuser has enough access to create the file wherever it's trying to create the file. If you don't know where it's going to create the file, specify that, like so:

Code:
system ('echo "I like PHP" > c:\temp\output' ,$retval);

Coditor
 
Back
Top