Home > Backend Development > PHP Tutorial > javascript - php怎么封装服务接口?

javascript - php怎么封装服务接口?

WBOY
Release: 2016-06-06 20:28:15
Original
1328 people have browsed it

用casperJS写了一段浏览器模拟登录网页的代码,单独执行这个文件可以在控制台进行。需要在另外的php文件中调用这个js文件的执行,怎么把这个js文件封装成一个服务接口给PHP调用?

回复内容:

用casperJS写了一段浏览器模拟登录网页的代码,单独执行这个文件可以在控制台进行。需要在另外的php文件中调用这个js文件的执行,怎么把这个js文件封装成一个服务接口给PHP调用?

<code class="php">system('casperjs login.js');//
</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template