php常用的一个常量
php中DIRECTORY_SEPARATOR 与 PATH_SEPARATOR的区别
DIRECTORY_SEPARATOR:路径分隔符,linux上就是’/’ windows上是’\’
PATH_SEPARATOR:include多个路径使用,在win下,当你要include多个路径的话,你要用”;”隔开,但在linux下就使用”:”隔开的。
这2个常量的使用能够避免不同平台的兼容性问题。
相关文档:
cookie 常用于识别用户。
什么是 Cookie?
cookie 常用于识别用户。cookie 是服务器留在用户计算机中的小文件。每当相同的计算机通过浏览器请求页面时,它同时会发送 cookie。通过 PHP,您能够创建并取回 cookie 的值。
如何创建 cookie?
setcookie() 函数用于设置 cookie。
注释:setcookie() 函数必须位于 <ht ......
1.
error_reporting(E_ERROR | E_WARNING | E_PARSE); //报错级别
@set_time_limit(1000); //设置函数执行的最大时间
set_magic_quotes_runtime(0); //为了安全
define('IN_COMSENZ', TRUE);
define('ROOT_PATH', dirname(__FILE__).'/../');   ......
When I deploy php application on apache, some problem come out, and solved. Here's the tips and problems solved.
0.How could I deploy an apache server armed with php, mysql, perl, and phpMyAdmin on the fly?
You need a package bundled with all these tools, xampp shall meet you needs, you can ......
需要用的php的正规匹配汉字,在网上找了些文章看了以下,看到这个的时候感觉这篇文章写的很真实,忍不住转过来了。
原文地址:http://hi.baidu.com/comdeng/blog/item/f272362e47ce29564ec226c5.html
在javascript中,要判断字符串是中文是很简单的。比如:
var str = "php编程";
if (/^[\u4e00-\u9fa5]+$/.t ......