摘要:
function aotuman($class){ include('./'.$class.'.class.php'); } spl_autoload_register('automan'); //把aotuman这个函数注册成一个自动加载函数 spl_autoload_register 注册的函数 阅读全文
摘要:
GetImageSize 作用:取得图片的大小[即长与宽] 用法:array GetImageSize(string filename, array [imageinfo]); ImageArc 作用:画弧线 用法:int ImageArc(int im, int cx, int cy, int w 阅读全文
摘要:
1、必须通过POST提交 2、 声明 enctype="multipart/form-data" $_FILES {[pic]=array ( [name]=> //文件原名 [type]=> //文件类型 [tmp_name]=> //临时文件路径 [error]=>0 //错误代码,0代表无错 阅读全文
摘要:
接口 abstract class db{ //连接服务器 public abstract function connect($n,$u,$p); //发送查询 protected abstract function query($sql); //查询单个数据 public abstract fun 阅读全文
摘要:
//这是一个递归转义数组function _addslashes($arr){foreach($arr as $k=>$v){if(is_array($v)){$arr[$k]=addslashes($v);}else if(is_array($v)){$arr[$v]=_addslanshe... 阅读全文
摘要:
目录操作opendir 打开目录readdir 读取目录closedir 关闭目录句柄mkdir 创建目录rmdir 删除目录is_dier 判断是否为目录$path='./www'//opendir 打开目录,返回资源句柄$dh=opendir($path); //$dh是句柄... 阅读全文
摘要:
//把a.txt的内容读出来,赋值给$str变量。//file_get_contrents()可以获取一个文件的内容或网络资源的内容。$file='./a.txt';echo file_get_contents($file);//读出来的内容能否写到另一个文件里去呢?//file_put_co... 阅读全文
摘要:
框架搭建:路径信息的初始化参数过滤 GET/POST运行日志 运行中的错误信息,sql信息记录下来报错级别 开发状态一个级别,上线状态一个级别数据库类配置文件的读取需要用的知识点数据库类:报错级别:参数过滤:递归运行日志:要求把运行中的信息记录在文件上(文件操作) 日... 阅读全文
摘要:
Error_reporting(0); //在网站正式上线的时候不准他报任何错误。 错误级别为不允许报错Exception 是所有异常的基类。测试并捕捉一个错误的例子: class mysql{ protected$conn=NULL; public function__cons... 阅读全文
摘要:
require 'HumanModel.php' ;$lisi=new HumanModel();$lisi->t();如上,没有require时,报错手动require进来如果网站比较大,model类比较多如HumanModelUserModel....等等1.这么多的Model类,我用谁,... 阅读全文