Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4178836
  • 博文数量: 601
  • 博客积分: 15410
  • 博客等级: 上将
  • 技术积分: 6884
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-16 08:11
个人简介

独学而无友,则孤陋而寡闻!

文章分类

全部博文(601)

文章存档

2020年(1)

2018年(4)

2017年(7)

2016年(42)

2015年(25)

2014年(15)

2013年(36)

2012年(46)

2011年(117)

2010年(148)

2009年(82)

2008年(37)

2007年(41)

分类:

2010-05-16 22:51:00

1、PHP的三个有用常量:
   DIRECTORY_SEPARATOR  
   PHP_EOL
   PATH_SEPARATOR

2、namespace,php5.3新加的功能,但是php手册上已经有相关内容。在Language Reference->Namespaces节,但是手册上没有注明版本号。

3、在上传swf的时候,要注意xss攻击。

4、One thing to note in comparison with ==

When we make a comparison with == php automaticly converts strings to integers when either side of the comparison is an integer, f.e.:
$value = 0;
if(
$value == "submit") {
   echo
"Let's submit";
}
?>
Above would be succesful, since "submit" is converted to an integer (eq 0) and the equation is would return true; (that's why (1 == "1submit") would also return true)

That's why we should use strcmp or === (checks type also), for string comparisons.

So my conclusion is that when comparing string, you'd better not make use of == (use strmp or === instead). For integer comparisons the == equation can be usefull, since our values will always be casted to an integer (1 == "1" returns true).


5、


阅读(1857) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~