Ƚϳõĺļ
/inc/function.inc.php


read_file($filename);
ȡļ,$filenameΪԻ·


write_file($filename,$data,$method);
дļ,$filenameΪԻ·,
$dataΪҪд,
$methodĬǸ滻ȫд,ֵaĻԭݵ׷д



del_file($path);
ɾĳļĳĿ¼$pathΪԻ·


gdpic($srcFile,$dstFile,$width,$height);
ͼƬĲü$srcFileԭͼƬ·ΪԻ·,
$dstFile,üͼƬ·
$width,$height ҪüɵĿ߶


table_field($table,$field);
˺ܣһֹܣĳǷĳֶΣеĻ1ûеĻ0
ڶֹǣ$fieldֶΪյʱ򣬾г$table鷽ʽ


is_table($table);
ĳǷ


upfile($upfile,$array);
ϴ󷵻صϴ֮µļĿ¼

һᰴ·ʽʹ,postfileΪиı

$array[name]=is_array($postfile)?$_FILES[postfile][name]:$postfile_name;    //ϴǰļ
$array[path]=$webdb[updir]."/123/";					    //ҪĸĿ¼,$webdb[updir]ΪϵͳĿ¼
$array[size]=is_array($postfile)?$_FILES[postfile][size]:$postfile_size;    //ļС
	
$array[updateTable]=1;	//ͳûϴļռÿռС,Ϊ0ʱ򣬾Ͳͳ
$filename=upfile(is_array($postfile)?$_FILES[postfile][tmp_name]:$postfile,$array);




makepath($path);
µĿ¼ж༶123/v/c/dҲһһԶ


tempdir($file);
ȡʵ·Ŀ¼ûУͷԶ̷
$fileΪ123/bcd.jpgԷhttp://xxxx/upload_files/123/bcd.jpg


get_word($content,$length);
ȡĳǰ漸֣$content,$lengthΪٸֽڣһֵֽ


filtrate($msg);
һûʱַаĵ˫ţţΪЩȽΣա


html($html);
ȡϵͳģ,
html('index'); Է d:\www\template\default\index.htmʵ·


getpage($table,$choose,$url,$rows=20,$total='');
ҳ
$totalԤ֪Ļ,$table,$choose,Ϊ,Ҫݿ.
$urlΪҳתURLlist.php?fid=$fid
$rowsÿҳʾ

$totalֵΪյĻ,Ҫݿ$tableΪ,$chooseΪ,where fid=1



refreshto($url,$msg,$time=1);
ҳת,һڳɹʱ
$urlΪҪתĿַ,$msgΪʾ,$timeȴʱ,Ϊ0Ļ,ת,ʾ


showerr($showerrMsg);
ʾҳ,淶,ͻгʾ.$showerrMsgΪʾ


mymd5($string,$action="EN");
ַ,$stringΪַ
$action="EN"ʱ,Ƕַ,="DE"ʱ,Ƕַ


set_cookie($name,$value,$cktime=0);
COOKIE¼,$name,$value,$cktime(λ)


get_cookie($name);
ȡCOOKIE,$name



add_user($uid,$money,$about='');
ִ,$uidûUID,$moneyӻ۳Ļ,Ϊ۳,$aboutΪ۳ԭ˵


delete_attachment($uid,$str);
ɾеĸ,$uidΪߵUID,$strΪַ,Ҫʹ$uidĿǷֹɾ



move_attachment($uid,$str,$newdir);
ƶ,еĸĿ¼ƶ,$uidûUID,$strΪ,$newdirΪµĿ¼,ָеĿ¼,Ǿ·


En_TruePath($content,$type=1);
ʱ,ԸľַURLַ滻,ַ,.

$type=1ʱ,,ʱʹ,$type=0ʱ,ݵʾʱʹ


get_money($uid);
ȡûĻ,$uidΪûUID



send_msg($uid,$title,$content,$fromuid=0);
վڶϢ,$uidΪ˵UID,$titleΪϢ,$contentΪϢ,$fromuidΪߵUID,


sms_send($mob,$content);
ֻ,$mobΪֻ,$contentΪ


check_imgnum($yzimg);
ûύ֤Ƿȷ,ͷ1,ͷ0


send_mail($email,$title,$content,$ifcheck=1);
ʼ,$emailΪ,$titleʼ,$contentʼ,$ifcheckΪ1ʱ,ʧ,ͱ,ֹͣ,Ϊ0ʱ,ʧܵʼ


















