- 博客(4)
- 收藏
- 关注
原创 php字符串编码的转换
可以用php内置的函数mb_convert_encoding($srt, $tocode, $fromcode)来实现 假设,现在有一个php文件,文件编码为utf-8 而头文件指定页面以gbk格式显示,这样,字符串直接显示出来,会是乱码 此时就需要字符串的转换。 echo mb_convert_encoding("你好中国", "GBK", "UTF-8"); 此时
2016-10-28 11:43:23 1436
转载 php写入txt追加
<?php file_put_contents("test.txt", "This is another something.", FILE_APPEND); ?>
2016-10-27 16:13:44 3591
原创 php将xml变成array
<?php $xmlstring = " 1 "; $xml = simplexml_load_string($xmlstring, 'SimpleXMLElement', LIBXML_NOCDATA); $xml = json_encode($xml); $xml = json_decode($xml, true); var
2016-10-24 16:47:52 1694
转载 win7下xshell连接不上虚拟机centos问题
链接:http://www.cnblogs.com/Leo_wl/p/4385434.html
2016-10-22 10:00:54 2459
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人