php 文件安装教程二
function writeText($f,$c){
if(is_writable($f) || !file_exists($f)){
if(!$h=fopen($f,'w'))return false;
if(!fwrite($h,$c))return false;
fclose($h);
}else{
return false;
}
return true;
}
function SQLString($c, $t){
$c=(!get_magic_quotes_gpc())?addslashes($c):$c;
switch($t){
case 'text':
$c=($c!='')?"'".$c."'":'NULL';
break;
case 'search':
$c="'%%".$c."%%'";
break;
case 'int':
$c=($c!='')?intval($c):'0';
break;
}
return $c;
}
function enc_p($c){
return md5(md5($c));
}
function getstop($i=1){
global $app_n;
return '