摘要: 先建一个Html的文件delete.html如下: <!DOCTYPE HTML><html><head> <meta http-equiv="content-type" content="text/html" charset="utf-8" /> <meta name="author" conte 阅读全文
posted @ 2016-11-28 16:14 PHP_zhang 阅读(217) 评论(0) 推荐(0)
摘要: <?php//文件上传if(!empty($_FILES)){ echo var_dump($_FILES)."<br>"; echo "文件名称:".$_FILES["myfile"]["name"]."<br>"; echo "文件类型:".$_FILES["myfile"]["type"]." 阅读全文
posted @ 2016-11-16 15:35 PHP_zhang 阅读(126) 评论(0) 推荐(0)
摘要: <?php //serialize()==>串行化将数据对象转换成二进制数据格式/*class person{ var $name="我"; function Say($content="ha!"){ echo $this->name."Say:".$content; }}$p=new person 阅读全文
posted @ 2016-11-16 13:56 PHP_zhang 阅读(388) 评论(0) 推荐(0)
摘要: <?php //连接数据库/*$con=mysql_connect("localhost","root","19960621");// or die('Error:'.mysql_error());if(!$con){ die("连接失败!".mysql_errno());}else{ echo " 阅读全文
posted @ 2016-11-14 15:34 PHP_zhang 阅读(10463) 评论(0) 推荐(0)
摘要: <?php//索引数组/*$a[0]=1;$a[1]=2;print_r($a);$a[2]=4;print_r($a);$b[]=100;$b[]=300;$b[]=500;print_r($b);echo "<br/>".count($a);*///关联数组/*$person[]='a001'; 阅读全文
posted @ 2016-11-13 21:26 PHP_zhang 阅读(447) 评论(0) 推荐(0)
摘要: <?php//无返回值,无参数/*function CreateTable(){ $col=""; //echo $col; $cindex=0; while($cindex<10){ $col.="<td></td>"; $cindex++; } $rindex=0; $row=""; while 阅读全文
posted @ 2016-11-13 21:24 PHP_zhang 阅读(173) 评论(0) 推荐(0)
摘要: <?php //封装 __set() __get() __isset() __unset()//__get()函数==>表示调用私有属性,如果是访问一般成员属性则不会调用该方法/*class Person{ private $age; function __get($var){ echo "哈哈哈" 阅读全文
posted @ 2016-11-12 22:16 PHP_zhang 阅读(173) 评论(0) 推荐(0)
摘要: <?php//定界符定义字符串/*$str=<<<test this is a “demo” hahaha,testestesttest;//PHP中输出函数echo() print_r() var_dump() print() die() printf() sprintf() //可以用来调试、输 阅读全文
posted @ 2016-11-12 22:07 PHP_zhang 阅读(150) 评论(0) 推荐(0)