php未被识别为内部或外部命令


php is not recognized as an internal or external command

我有这个c++代码

if(i>1)
  {
    std::system("php -f C:''Program Files''EasyPHP    12.1''www''CarProtectionSystem''UpdateDetection.php");
  }

我正在使用EasyHP。。。但当我运行代码时,我会遇到这样的错误:php没有被识别为内部或外部命令可操作的程序或批处理文件。

有什么帮助吗?

它告诉您php.exe(或php.cmdphp.bat)不在系统路径中。将其添加到路径中,或包含exe 的完整路径

(例如std::system("c:''Program Files''<whatever>''php.exe -f ...