2008
08.27

有三道PHP的面试题,除了第三题需要一些经验和对HTTP协议理解外,前面两题其实很简单,但是很少遇到有人答正确的,大部分人我想都不是技术问题,而是思考是否严谨的问题。

1. 下面语句输出什么?为什么?
if ($a=$b)  printf(“a==b”);
else  printf(“a!=b”);
2. $array[‘anykey’]和$array[anykey]有什么区别?
3. 写出使用telnet命令通过GET的方式访问http://www.toplee.com/index.php 得到页面返回的方法(不是用PHP实现,用dos或者unix命令行实现)。

23 comments so far

Add Your Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word