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?