Home > Backend Development > PHP Tutorial > php basic usage

php basic usage

WBOY
Release: 2016-06-23 14:35:53
Original
937 people have browsed it

1.使用逗号链接数据  echo $num."
";

2.弱类型  function  foo($var1,$var2){}

      function tool(&$var1,&$var3){}可操作外部变量

    声明函数,下面就可以直接使用了

3.' '    跟 "  " 的区别,单引号不解析变量,只有是字符。

4.    $dir=opendir("image") ; $file=readdir($dir);echo $file;

5.包括当前目录下的文件,如果是html就显示html,是txt就显示txt,是php,就解析php

6. 只包含一次

7.require 静态包含:比如头尾包含比较固定的

   include动态包含:就是在函数的结构中可以包含的,比如:include "image/temp.txt";

8.使用'

'     '/<pre class="brush:php;toolbar:false">'  可以显示一些原始的格式   <p>9.var_dump  and print_r   hava the same function ,but var_dum will give the varible information</p>   <p>10.</p>   <p> </p>   <p> </p>   
Copy after login
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