上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 54 下一页
摘要: (转载)http://www.jb51.net/article/30689.htm我们知道,PHP没有提供专门删除一个特定数组元素的方法。但是可以通过unset()函数来完成这种要求比如下面的程序: <?php $arr = array('apple','banana','cat','dog'); unset($arr[2]); print_r($arr); ?> 程序运行结果:Array ( [0] => apple [1] => banana [3] => dog ) 但是这种方法的最大缺点是没有 阅读全文
posted @ 2013-06-20 14:29 robotke1 阅读(328) 评论(0) 推荐(0)
摘要: HTTP/1.1 200 OKServer: nginxDate: Thu, 20 Jun 2013 03:06:10 GMTContent-Type: text/html; charset=utf-8Connection: closeVary: Accept-EncodingContent-Length: 447String could not be parsed as XML_rare_shutdown_err:Array( [type] => 2 [message] => print_r(): Node no longer exists [file] => /xxx.p 阅读全文
posted @ 2013-06-20 12:59 robotke1 阅读(181) 评论(0) 推荐(0)
摘要: (转载)http://developer.51cto.com/art/200912/166080.htm我们在使用PHP语言进行实际编码中时,通常会遇到许多错误的出现,比如在截取字符串时会出现乱码等。我们今天就要为大家介绍如何正确的运用PHP mb_substr函数,减少错误的发生。1.确保你的Windows/system32下有php_mbstring.dll这个文件,没有就从你Php安装目录extensions里拷入Windows/system32里面。2.在windows目录下找到php.ini打开编辑,搜索mbstring.dll,找到;extension=php_mbstring.d 阅读全文
posted @ 2013-06-17 20:33 robotke1 阅读(218) 评论(0) 推荐(0)
摘要: (转载)http://blog.csdn.net/alongken2005/article/details/7098506PHP substr()函数可以 分割文字,但要分割的文字如果包括中文字符往往会遇到问题,这时可以用mb_substr()/mb_strcut这个函数,mb_substr() /mb_strcut的用法与substr()相似,只是在mb_substr()/mb_strcut最后要加入多一个参数,以设定字符串的编码,但是 一般的服务器都没打开php_mbstring.dll,需要在php.ini在把php_mbstring.dll打开。mbstring 函数的说明:php的m 阅读全文
posted @ 2013-06-17 20:30 robotke1 阅读(249) 评论(0) 推荐(0)
摘要: (转载)http://developer.51cto.com/art/201105/263103.htm在PHP中,strlen与mb_strlen是求字符串长度的函数,但是对于一些初学者来说,如果不看手册,也许不太清楚其中的区别。下面通过例子,讲解这两者之间的区别。先看例子:<?php //测试时文件的编码方式要是UTF8 $str='中文a字1符'; echo strlen($str).'<br>';//14 echo mb_strlen($str,'utf8').'<br>';//6 echo 阅读全文
posted @ 2013-06-17 20:16 robotke1 阅读(205) 评论(0) 推荐(0)
摘要: (转载)http://php.net/manual/zh/function.apc-fetch.phpapc_fetch(PECL apc >= 3.0.0)apc_fetch—从缓存中取出存储的变量Report a bug说明mixedapc_fetch(mixed$key[,bool&$success] )从缓存中取出存储的变量Report a bug参数keykey是使用apc_store()存储的键名。 如果传递的是一个数组,则数组中的每个元素的值都被返回successSet toTRUEin success andFALSEin failure.Report a bug 阅读全文
posted @ 2013-06-17 16:49 robotke1 阅读(340) 评论(0) 推荐(0)
摘要: (转载)http://www.neatstudio.com/archives/?article-2061.html时隔一年多,APC终于又更新了,这次更新最大的就是支持PHP5.4:- Add PHP 5.4 support (Dmitry, Anatoliy, Pierre)- Fixed bug #22679: Fix apc_bin_dump for constants. Use IS_CONSTANT_TYPE_MASK to handle all the constants, including the unqalified ones (instead of ~IS_CONSTANT 阅读全文
posted @ 2013-06-17 16:45 robotke1 阅读(299) 评论(0) 推荐(0)
摘要: (转载)http://justcoding.iteye.com/blog/601117/代码://定义编码header( 'Content-Type:text/html;charset=utf-8 ');//Atomheader('Content-type: application/atom+xml');//CSSheader('Content-type: text/css');//Javascriptheader('Content-type: text/javascript');//JPEG Imageheader('C 阅读全文
posted @ 2013-06-17 15:32 robotke1 阅读(276) 评论(0) 推荐(0)
摘要: test1.php<?PHP $g_user = "Jack"; echo $g_user;?>test3.php<?PHP header('Location: http://localhost/testDtwfile/test1.php'); echo "-------------------------".'<br>';?>首先我们在浏览器中输入:刷新:从上面可以看到页面跳转到test1.php这个网页中了。 阅读全文
posted @ 2013-06-17 15:23 robotke1 阅读(231) 评论(0) 推荐(0)
摘要: (转载)http://www.cnitblog.com/neatstudio/archive/2006/07/21/13990.htmlphp之call_user_func_array的简易用法今天在群里面,有个叫lewis的在问call_user_func_array的用法,因为之前一直没有用过,也不能说什么,于是看一下手册,发现是这么写的:call_user_func_array(PHP 4 >= 4.0.4, PHP 5)call_user_func_array-- Call a user function given with an array of parameters Des 阅读全文
posted @ 2013-06-17 14:10 robotke1 阅读(340) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 54 下一页