Home > Backend Development > PHP Tutorial > 字符串乱码解决思路

字符串乱码解决思路

WBOY
Release: 2016-06-13 12:46:52
Original
1439 people have browsed it

字符串乱码

<?php<br />
$url = 'http://luolai.tmall.com/search.htm?pageNum=1';  <br />
$lines_array = file($url);  <br />
echo $lines_array; echo "<br/>"; <br />
<br />
$lines_string = implode('', $lines_array);   <br />
eregi("<title>(.*)</title>", $lines_string, $head); <br />
echo "head:".$head;  <br />
echo "<br/>"; print_r($head); <br />
echo "<br/>";  <br />
echo "title:".$head[1]; <br />
<br />
?>
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