Copy CodeThe code is as follows:
function Execute ($cmd) {
$res = ";
if ($cmd) {
if (function_exists (' system ')) {
@ob_start ();
@system ($cmd);
$res = @ob_get_contents ();
@ob_end_clean ();
} elseif (Function_exists (' PassThru ')) {
@ob_start ();
@passthru ($cmd);
$res = @ob_get_contents ();
@ob_end_clean ();
} elseif (Function_exists (' shell_exec ')) {
$res = @shell_exec ($cmd);
} elseif (function_exists (' exec ')) {
@exec ($cmd, $res);
$res = Join ("\ n", $res);
} elseif (@is_resource ($f = @popen ($cmd, "R")) {
$res = ";
while (! @feof ($f)) {
$res. = @fread ($f, 1024);
}
@pclose ($f);
}
}
return $res;
}
http://www.bkjia.com/PHPjc/328006.html www.bkjia.com true http://www.bkjia.com/PHPjc/328006.html techarticle Copy the code code as follows: function execute ($cmd) {$res = ' ', if ($cmd) {if (function_exists (' system ')) {@ob_start (); @system ($cmd); $res = @ob_get_contents (); @ob_end_clean (); }...