[Help] How does php Execute phantomjs to output the obtained html content to the php variable?

Source: Internet
Author: User
How does php Execute phantomjs to output the obtained html content to the php variable? PS: currently, php runs phantomjs through system to output the obtained html content to the txt file! Php can get html content by reading files, but can't output txt... php Execute phantomjs. How can I output the obtained html content to php variables?

PS: currently, php runs phantomjs through system to output the obtained html content to the txt file!
Php can get html content by reading files, but can it directly get the variable without outputting a txt file?

Reply content:

How does php Execute phantomjs to output the obtained html content to the php variable?

PS: currently, php runs phantomjs through system to output the obtained html content to the txt file!
Php can get html content by reading files, but can it directly get the variable without outputting a txt file?

As far as I know, there will be some places to get the records of use and output through command line execution. It's okay to read the file in php.

Help. Is there anyone to help you!

Can I send http requests in phantomjs? Post to PHP, or use a file pipeline.

Try: getPageSource ()

Useexec()Function substitutionsystem()Function,exec()The second parameter$outputIs an array that can accept the return value of the command. Each row has one element.

  • exec()

  • system()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.