繁体   English   中英

运行简单的PHP脚本时出现Gettin错误

[英]Gettin error when running simple php script

我正在尝试运行以下简单脚本:

<?php

$PHP_PATH = "c:\Program Files (x86)\PHP\\";
$CLIENTPATH = dirname(__FILE__)."\Client.php";
$SERVER = "http://localhost:8080/mobile/Server";

$handle = popen("C:\WINDOWS\system32\cmd /C start ".$PHP_PATH." -f ".$CLIENTPATH." ".$SERVER, 'r');

?>

但我总是会收到此Windows消息框错误:

Windows cannot find c:\program. Please make sure you typed the name correctly and then try again.

在google上搜索时,我也发现了有关此错误的线程 ,但我想我的措施很严格。
那么问题出在我的代码中吗? 还是可能有其他问题?

谢谢。

您需要转义$PHP_PATH = "c:\\Program Files (x86)\\PHP\\\\";的空格$PHP_PATH = "c:\\Program Files (x86)\\PHP\\\\";

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM