php basic usage

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

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

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

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

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

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

5.<?php    include "mytxt.txt";   ?>包括当前目录下的文件,如果是html就显示html,是txt就显示txt,是php,就解析php

6.<?php include_once "mytxt.txt";?> 只包含一次

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

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

8.使用'<pre>'     '/<pre>'  可以显示一些原始的格式

9.var_dump  and print_r   hava the same function ,but var_dum will give the varible information

10.

 

 

posted @ 2012-07-29 21:52  Epirus  阅读(171)  评论(0编辑  收藏  举报