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

字符串乱码解决思路

WBOY
WBOYOriginal
2016-06-13 12:46:521434browse

字符串乱码

<?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 />
?>

这个打印出来有乱码,如何才能不乱码?

Statement:
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