随笔分类 - PHP
摘要:定义和用法:error_reporting() 设置 PHP 的报错级别并返回当前级别。 函数语法:error_reporting(report_level) 如果参数 level 未指定,当前报错级别将被返回。下面几项是 level 可能的值:值 常量 描述1 E_ERROR 致命的运行错误。错误...
阅读全文
摘要:"; } public function say() { echo "父类" . $this->name . "今年," . $this->age; }}class sun extends family { public $name; //与父类属性同名将覆盖父...
阅读全文
摘要:"; } public function say() { echo "父类" . $this->name . "今年," . $this->age; }}class sun extends family { public $name; //与父类属性同名将覆盖父...
阅读全文
摘要:"; if (isset($this->$property_name)) { return($this->$property_name); } else { return(NULL); } } //__...
阅读全文
摘要:seqArr = $arr; $this->length = count($arr); } /* * 返回线性表中第$index个数据元素 */ public function GetElem($index) { if (($this->...
阅读全文
摘要:有些主机服务商把php的allow_url_fopen选项是关闭了,就是没法直接使用file_get_contents来获取远程web页面的内容。那就是可以使用另外一个函数curl。 利用function_exists函数来判断php是否支持一个函数可以轻松写出下面函数
阅读全文
摘要:require: 可能多次执行的代码用require效率要稍高require_once:唯一区别是 PHP 会检查该文件是否已经被包含过,如果是则不会再次包含include:语句包含并运行指定文件。include_once: 包含之后就不会再次包含require没找到将产生致命错误,include没...
阅读全文