Hi,
I wish to execute following unix CSH Shell command through
PHP. The Command is:
ansys70 -p ansysrf <inputfile> outputfile
Basically above command runs perfect on Unix Command Promt
but doesn't execute through the Script.
The command submits an "inputfile" for processing to a software called ANSYS, and should redirect the output to the "outputfile".
If i just execute the executable command of ANSYS that is just
ansys70 -p ansysrf through PHP it executes but i am afraid PHP is
not able to understand '<' sign which indicates some directional
input that should be given to the software and a further
redirection '>' to an "outputfile".
I am also using the PATH correctly where the ANSYS Software is
located.
I have tried with all the commands that PHP support for Unix shell execution.(system,passthru,exec,shell_exec)
If anybody could give me some hints, it would be great.
Help in executing a Unix CSH Shell Command through PHP
Moderator: General Moderators
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
I'm really tired right now so I might be misunderstanding what you're trying to do, but....
shouldn't you have a '>' in there?
Another thing you might check, make sure your webserver has permission to write to whatever directory you're writing to.
shouldn't you have a '>' in there?
Code: Select all
<?php
system("ansys70 -p ansysrf ".$inputfile." > ".$outputfile);
?>Runnin Unix Script
Hey Penguinboy,
Thanks for caring to help me. i didn't set the permissions to read the inputfile.
I got the answer!
Thanks again
Thanks for caring to help me. i didn't set the permissions to read the inputfile.
I got the answer!
Thanks again