加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

CasperJS将数据传回PHP

发布时间:2020-12-13 14:06:30 所属栏目:PHP教程 来源:网络整理
导读:CasperJS由 PHP使用exec()命令调用.在CasperJS执行其工作之后,如检索网页的一部分,如何将检索的数据返回给PHP? 您可以将输出从stdout重定向到数组. 在this页,它说你可以做: string exec ( string $command [,array $output [,int $return_var ]] ) 继续说
CasperJS由 PHP使用exec()命令调用.在CasperJS执行其工作之后,如检索网页的一部分,如何将检索的数据返回给PHP?
您可以将输出从stdout重定向到数组.

在this页,它说你可以做:

string exec ( string $command [,array &$output [,int &$return_var ]] )

继续说:

If the output argument is present,then the specified array will be filled with every line of output from the command.

所以基本上你可以执行exec(‘casperjs命令这里,$array_here);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读