【发布时间】:2023-04-04 02:45:02
【问题描述】:
问题:用hello.js获取Warning: exec(): Unable to fork
问题:我怎样才能让它发挥作用?
说明:
我正在尝试让 phantomJs 在 Windows 服务器上工作。我在public_html 文件夹中有以下文件:
- phantomjs.exe
- index.php
- hello.js
index.php 就是这样:
<?php $response = exec('phantomjs.exe hello.js');
而hello.js 是:
console.log("Hello world!");
phantom.exit();
当我运行index.php 时出现以下错误:
Warning: exec(): Unable to fork [phantomjs.exe hello.js] in D:\sites\creditflow.com\public_html\index.php on line 1
以上代码目前托管在here。
问题:我怎样才能让它工作?
【问题讨论】:
标签: javascript php windows phantomjs