PHp 运行不了系统命令(非安全模式)
发表于 : 2009-11-02 19:55
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$system = exec('touch aa.sh');
echo $aa."aa"
//echo '\./auto'
?>
不成功。。。另外gedit也不行,运行一下脚本也不行:
#!/bin/bash
#auto.sh
expect<<-END
spawn ./a
expect "*password*"
send "xxx\n"
expect eof
exit
END
#!/bin/bash
#a
su
touch guagua.sh
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$system = exec('sh auto.sh');
echo $aa."aa"
//echo '\./auto'
?>
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$system = exec('touch aa.sh');
echo $aa."aa"
//echo '\./auto'
?>
不成功。。。另外gedit也不行,运行一下脚本也不行:
#!/bin/bash
#auto.sh
expect<<-END
spawn ./a
expect "*password*"
send "xxx\n"
expect eof
exit
END
#!/bin/bash
#a
su
touch guagua.sh
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$system = exec('sh auto.sh');
echo $aa."aa"
//echo '\./auto'
?>