【发布时间】:2015-02-18 01:30:25
【问题描述】:
在终端中使用 phantomjs 时,我真的很迷茫。我想在代理下访问我的网站并执行 p.js,但它不断吐出我不理解的错误。没有代理它甚至不会去那里..
phantomjs> --proxy=190.40123.36:8080 http://example.com/req.php
Unexpected token '='
phantomjs://repl-input:1 in global code
phantomjs> --proxy=190.40123.36:8080 /home/engine/public_html/p.js http://example.com/req.php
Unexpected token '='
phantomjs://repl-input:1 in global code
phantomjs> --proxy 190.40123.36:8080 /home/engine/public_html/p.js http://example.com/req.php
Unexpected number '190.40123'
phantomjs://repl-input:1 in global code
phantomjs> /home/engine/public_html/p.js http://example.com/req.php
Expected an identifier but found 'http' instead
phantomjs://repl-input:1 in global code
phantomjs> /home/engine/public_html/p.js http://example.com/req.php
什么是全局代码中的 repl-input:1?
我知道即使在最后一个命令中它也没有到达我的站点,因为在 req.php 中我正在获取 php $_SERVER 对象并写入 test.txt
【问题讨论】: