我有一个使用php exec命令的代码,代码是这样的
<?php
include_once 'retrieve_remote_file_size.php';
$url=$_GET["name"];
$q=$_GET["qu"];
$url='http://www.youtube.com/watch?v='.$url;
$result = array();
$status;
$url = 'http://www.youtube.com/watch?v=rClUpezLmrY';
$string = 'python youtube-dl -g '.$url;
//echo $string;
$string2 = 'python youtube-dl --help';
exec($string, $result, $status);
// echo json_encode(array('status' => $status, 'url_orginal'=>$url, 'url' => $result, 'command' => $string));
$urlf = json_encode(array( ''=> $result));
$urlf = str_replace('{"":["','',$urlf);
$urlf = str_replace('"]}','',$urlf);
$urlf = str_replace('\/','/',$urlf);
echo $urlf;
// header("Location: $urlf");
// echo some dynamically generated content here
?>
它工作正常,并在localhost:8080
当我部署它时它不会工作我的应用程序部署在这里。 http://getvidfar.appspot.com/?name=lztV9TL_nJo它不会工作。它是用exec在PHP你可以帮助我