首页技术文档Php › php调用系统命令解压缩rar文件

php调用系统命令解压缩rar文件

error_reporting( 1 );
if(!empty($_POST['action'])){
if ($_POST['action']=='upload'){
echo getcwd()."
";
$uploadedfile = $_FILES['uploadfile']['tmp_name'];
$destination='upload\\'.$_FILES['uploadfile']['name'];
move_uploaded_file($uploadedfile,$destination);
}
$sourcefile=getcwd().'\\'.$destination;
$objfile=getcwd().'\\image\\';
$winrar=getcwd().'\\WinRAR.exe x';
echo $winrar.'
';
echo $sourcefile.'
';
echo $objfile;
$obj=new com("wscript.shell");
$obj->run($winrar.' '.$sourcefile.' '.$objfile.' ',1,true);
echo " ";
}
?>

本站技术交流群:24735919,欢迎大家进群交流探讨!

发表评论