PHP常见有关问题

WBOY
Release: 2016-06-13 12:49:29
Original
1033 people have browsed it

PHP常见问题

1. 当一个页面中同时出现html脚本和php脚本时,php脚本应该放在html脚本的前面。否则在html中穿插php代码的话,不能识别php代码。

  比如简易计算器。


2. 解释型语言和编译型语言。php语言类型?解释型语言与编译型语言的区别,就是编译的结果是否保存。

   执行过程:读入源代码-->词法分析-->语法分析-->opcode->执行


3.值传递和引用传递,只要出现传参时,都会出现。


4.echo和var_dump的区别,var_dump可以打印出数据类型。


5.mysql -uroot -p


6.递归:类似于找出文件夹下的所有文件(用于理解递归)。区别于迭代(相当于循环)。


7.  $stu1 = new Stu; --没有括号
     var_dump($stu1);


8.php与html的交互? 直接在html中穿插php代码。


9.return 相当导入文件。也可以用于函数的返回。


10. include的文件位置? php与html的区别,html查找的方式的请求,只能在在项目的根目录以下查找,而php则默认在include_path下查找

      也可以设置其路径。 路径是相当于执行代码的文件而言的。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!