|
现在的情况是可以从上个页面正常取值,并且如果echo的话能看到要执行的系统命令。不过无论我用system() ;exec(); $str =system ;$str =exec ; 还是passthru 都不能够执行命令,为何啊?
执行页面如下:
<?php session_start();?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
<?php
#$_SESSION[dates]=$_POST[dates];
#echo $_POST[dates];
$_SESSION[dates]=$_POST[dates];
echo $_SESSION[dates];
//echo ("/usr/local/apache/htdocs/web/umount /usr/local/apache/htdocs/web/itbn/");
//echo ("/usr/local/apache/htdocs/web/mount -o bind /var/www/html/backup/$_SESSION[dates]/itbn/ /usr/local/apache/htdocs/web/itbn/");
$str = exec ("/usr/local/apache/htdocs/web/umount /usr/local/apache/htdocs/web/itbn/");
echo $str;
$str = exec ("/usr/local/apache/htdocs/web/mount -o bind /var/www/html/backup/$_SESSION[dates]/itbn/ /usr/local/apache/htdocs/web/itbn/");
echo $str;
//passthru (" /usr/local/apache/htdocs/web/umount /usr/local/apache/htdocs/web/itbn/ ",$retval);
//echo $retval;
//passthru (" /usr/local/apache/htdocs/web/mount -o bind /var/www/html/backup/$_SESSION[dates]/itbn/ /usr/local/apache/htdocs/web/itbn/ ",$retval);
//echo $retval;
?>
</body>
</html> |
|