深圳Web培训
达内深圳罗湖中心

134-1646-6912

热门课程

雅虎web笔试题

  • 时间:2015-08-20 11:15
  • 发布:SZ达内
  • 来源:深圳达内

1. Which of the following will not add john to the users array?
  1). $users[] = 'john';
  2). array_add($users,'john');
  3). array_push($users,'john');
  4). $users ||= 'john';

2. What's the difference between sort(), asort() and ksort? Under what circumstances would you use each of these?

3. What would the following code print to the browser? Why?
     $num = 10;
     function multiply(){
          $num = $num * 10;
     }
     multiply();
     echo $num;

4. What is the difference between a reference and a regular variable? How do you pass by reference & why would you want to?

5. What functions can you use to add library code to the currently running script?

6. What is the difference between foo() & @foo()?

7. How do you debug a PHP application?

8. What does === do? What's an example of something that will give true for '==', but not '==='?

9. How would you declare a class named “myclass” with no methods or properties?

10. How would you create an object, which is an instance of “myclass”?

11. How do you access and set properties of a class from within the class?

12. What is the difference between include & include_once? include & require?

13. What function would you use to redirect the browser to a new page?
     1). redir()
     2). header()
     3). location()
     4). redirect()

14. What function can you use to open a file for reading and writing?
     1). fget();
     2). file_open();
     3). fopen();
     4). open_file();15. What's the difference between mysql_fetch_row() and mysql_fetch_array()?

16. What does the following code do? Explain what's going on there.
     $date='08/26/2003';
     print ereg_replace(“([0-9]+)/([0-9]+)/([0-9]+)”,2/1/3,$date);

17. Given a line of text $string, how would you write a regular expression to strip all the HTML tags from it?

18. What's the difference between the way PHP and Perl distinguish between arrays and hashes?

19. How can you get round the stateless nature of HTTP using PHP?

20. What does the GD library do?

21. Name a few ways to output (print) a block of HTML code in PHP?

22. Is PHP better than Perl? – Discuss.

这里有参考答案:http://d.download.csdn.net/down/505057/AnsonYe


【公司面试题之:酷讯PHP工程师笔试题】
PHP&HTML 基础操作题
● 有三个php文件位于同一目录下,内容为
a.php:-------
<?php function fa() { echo "in Function A\n"; }?>
b.php:-------
<?php include 'a.php'; ?>
<?php function fb() { fa(); echo "in Function B\n"; } ?>
c.php:-------
<?php include 'a.php'; ?>
<?php include 'b.php'; ?>
<?php fa(); fb(); ?>
使用浏览器访问 c.php,请问是否存在问题。
如果存在问题,请指出修正方法并写出浏览器查看效果
如果不存在问题,请写出浏览器查看效果

● 从表login中选出name字段包含admin的前10条结果所有信息的sql语句
● 准确的指出以下代码的显示结果
<table border=1 width=500 style="text-align:center;">
  <tr>
    <td rowspan=2 width=50% height=50>a</td>
    <td width=50% eight=25>d</td>
  </tr>
  <tr><td width=50% height=25>b</td></tr>
  <tr height=25><td colspan=2>c</td></tr>
</table>

● 准确的指出以下代码的显示结果
<style>
.a {
  position:relative;
  height:200px;
  width:500px;
  border:solid 1px #000;
  background:#FFF;
}
#b,#c {position:absolute; width:250px; height:90px;}
#b {top:30px;left:50px; background:#FF0000; z-index:1;}
#c {bottom:30px; right:50px; background:#0000FF;}
</style>
<div class="a">
  <div id="b"></div>
  <div id="c"></div>
</div>

● 请说明HTML文档中DTD的意义和作用
● 判断以下代码是否正确,如果有错,请指出错误,如果正确,请指出运行结果
var arr = new Array(new Array(1,2,3,4),
  new Array('abc', "def", "xyz"),
);
for(i = 0; i < arr.length; i++) {
  document.write(arr[0])
}

● 如何使用javascript获取当前DOM元素(obj)的左上角在整个文档中的位置
● 可以使用哪些方法使用javascript向服务器发出请求且不离开当前页面,简单对比各自的特点(如果存在)
●        请写出php连mysql连接中,获取下一个自增长id值的方法,可以写多个。
●        请问cgi和fastcgi有什么不同,你在什么情况下会选择哪个
●        Php中如何判断一个字符串是否是合法的日期模式:2007-03-13 13:13:13 。要求代码不超过5行。
●        Php中,如何获得一个数组的键值?
●        zend optimizer是什么
●         如何用命令把mysql里的数据备份出来

Linux操作:
● vi编辑器中,选中、复制、粘贴、删除的命令各是什么
● 获取文件行数
● 输入文件的最后5行到另一个文件中
● 查找文件中包含hello的行
●        查找当前目录下所有目录名为CVS的子目录的命令
●        删除当前目录下所有目录名为CVS的子目录的命令
●        如何让一个程序在后台运行并把输入定向到指定的文件
●        如何把一个文件的内容添加到另一个文件的末尾
●        如何实时的显示一个文件的输出
●        定时执行一个程序的方法有什么
●        Vi编辑器中,如何替换指定的字符串
●        当更新后,cvs中文件有冲突时。如何判断哪些你编辑的内容和更新下来的内容
上一篇:没有上一篇了
下一篇:雅虎web笔试题

马上预约三天免费体验课

姓名:

电话:

阿里巴巴web前端开发面试题

web前端工程师企业面试题

web前端面试题全面整理

java+web笔试题

选择城市和中心
贵州省

广西省

海南省