HTML+CSS
大叔说码
笨鸟先飞!切莫妄自菲薄![email protected]
展开
-
记几个页面乱码的解决方法
如果我们的网站用的是utf-8编码,为防止乱码出现,需要注意以下地方: ①:php连接数据库,指定数据库编码: mysql_set_charset('utf8'); /* mysql_set_charset ( string $charset [, resource $link_identifier = NULL ] ) $link——MySQL 连接。如不指定连接标识,则使用由 mysql_原创 2016-12-09 19:33:29 · 560 阅读 · 0 评论 -
php 正则抓取网页的table数据
不啰嗦,上代码 <?php class fetchData { public function tuandai($url){ if($str === '') { return false; } $fcontents=file_get_contents($url); $table_data = preg_match_all('原创 2017-07-11 12:12:14 · 5632 阅读 · 0 评论