popen不会开始我的档案

时间:2017-11-08 16:52:08

标签: php sql popen

我试图在我的桌面上打开一个文件,但出于某种原因它只能在我的本地主机上运行,​​而不是在我上传到我的服务器上时。我做错了吗?

<?php
include "includes/connect.inc.php";
include "includes/core.inc.php";
include "includes/header.inc.php";
?>

<?php
if(isset($_GET["id"])){
echo '<div id="background">';
echo '<div id="loader">';
echo '<img src="image/loading.gif" />';
echo '</div>';

$id = $_GET["id"];

$query = "SELECT * FROM movie WHERE id = '$id'";
$query_run = $db->query($query);
$row = mysqli_fetch_assoc($query_run);

$querys = "SELECT * FROM drive";
$query_runs = $db->query($querys);
$rows = mysqli_fetch_assoc($query_runs);

$drive = $rows["drive"];    
$filep = nl2br($row["filepath"]);

$file = $drevet . $filep;


$sql = "INSERT INTO latest VALUES('', '$id')";
$sql_run = $db->query($sql);

$str = str_replace('/', '\\', $file);


$vlc = "C:\Program Files (x86)\VideoLan\VLC\vlc.exe";
pclose(popen("start \"$vlc\" \"$str\"", "r"));
}
echo '</div>';
?>

0 个答案:

没有答案