Hi,
Please excuse this seemingly retarded mail.
While fun, PHP is more then 4 handfuls and I only have 2.
An example php script;
$username = foo; exec('/root/script.sh'.($username));
My script.sh file;
#!/bin/tcsh mkdir /root/$username
When I execute my PHP script, I get this;
sh: /root/script.shfoo: No such file or directory
I was hoping to pass the PHP var of $username to mkdir in the tcsh script and make a directory called /root/foo.
I don't understand whats going on.
Any ideas?
- aurf
$username = foo; exec('/root/script.sh'.($username));
My script.sh file;
#!/bin/tcsh mkdir /root/$username
shell script? Why not use PHP: http://php.net/function.mkdir
On Sat, 27 Jun 2009 17:41:07 -0700 aurfalien@gmail.com wrote:
Hi,
Please excuse this seemingly retarded mail.
While fun, PHP is more then 4 handfuls and I only have 2.
An example php script;
$username = foo; exec('/root/script.sh'.($username));
exec('/root/script.sh '.escapeshellarg($username)); or exec(escapeshellcmd('/root/script.sh '.$username));