-   Programming (
-   -   PHP pass argument to shell script (

monzter 08-13-2004 02:55 PM

PHP pass argument to shell script
I try to pass argument to shell script with PHP
It not work!

I try

shell_exec(" /home/test");

on PHP


mkdir $1

on shell script

Shell can work console but not work when I run with PHP

What wrong with me?
and what should I do?
or I need to setup something on my RH9 server ?

pls tell me thank :)

masand 08-13-2004 04:10 PM

lookout for help in
'escapeshellargs' function
in PHP and try using 'passthru' functions in PHP

then u can execute ur commads with arguments in them

david_ross 08-14-2004 06:16 AM

Also make sure that the script you are trying to run is in the PATH for php. Try using the full path.

All times are GMT -5. The time now is 10:56 AM.