Does javascript-js have usage similar to php's separator EOF?

Source: Internet
Author: User
Dependencies & quot; $ valuehtmlentities (file_get_contents ($ url); after crawling, varo & #39; & #39; is processed in JavaScript on the webpage ;; if the captured data is short and normal, no error will be reported, but if it is complicated html or there is a line feed, the webpage will report an error. how can this problem be solved? Is js similar to php's separator EOF javascriptphp?

Xiao Bai
Use php to capture the html of a webpage
$ Url = "http://www.xxxxxxxxxxx.com/h5/12.html ";
$ Value = htmlentities (file_get_contents ($ url ));
Capture and then use JavaScript to process the webpage
Var o =' ';

If the captured data is short and normal, no error is reported.
However, if html is complex or contains line breaks, an error is reported on the webpage.
How can we deal with this situation?
Does js have usage similar to php's separator EOF?

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.