10 2013 档案
摘要:php json josn_decode()返回的是对像,如何把对像转成数组a.php传值页面,使用 json_encode($array)对数组进行加密码.b.php页面在接收a.php传过来的页面的值使用的是 json_decode($array),发现解密出来的数据是对象形式的:array(2) { [0]=> object(stdClass)#2 (4) { ["id"]=> string(1)"1" ["name"]=> string(9)"张雪梅" ["age"]=
阅读全文
摘要:php file_get_contents计时读取一个文件/页面 防止读取不到内容$url = 'http://www.baidu.com/index.php';$opts = array( 'http' => array( 'method' => 'GET', 'header' => 'Accept-language: en\r\n'.'Cookie: foo=bar\r\n', 'timeout'=> 20 ) ); $context =
阅读全文
摘要:jquery ajax中 前台后台文件中编辑都是uft-8,返回数据还是乱码解决如下:在后台处理文件里面需要再加编辑header("Content-Type:text/html;charset=utf-8");
阅读全文
摘要:Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename...[可能没有默认的字体]例://putenv('GDFONTPATH=C:\WINDOWS\Fonts');$font = "Arial";$size = 12;$im = ImageCreateFromPNG("top_logo.png");$tsize= imagettfbbox($size, 0, $font, $_GET['message']);改成://putenv(&#
阅读全文