function userloginfo($usertemp){
$detail=explode("|",$usertemp);
return $detail;
}
$login=userloginfo($userdb);
function userloginfo($usertemp){
global $detail;
$detail=explode("|",$usertemp);
}
userloginfo($userdb);
$urlarray=explode('/',$HTTP_SERVER_VARS['REQUEST_URI']);
$urlcount=count($urlarray);unset($urlarray[$urlcount-1]);
$ofstarurl='http://'.$HTTP_SERVER_VARS['HTTP_HOST'].implode('/',$urlarray);
$pre_urlarray=explode('/',$HTTP_SERVER_VARS['HTTP_REFERER']);
$pre_url=array_pop($pre_urlarray);
八、 使用不等時 != 與 <>效率相當
if($online){
$online1=$online;
setcookIE('online1',$online,$cookIEtime,$ckpath,$ckdomain,$secure);
}
if($online)
setcookie('online1',$online,$cookIEtime,$ckpath,$ckdomain,$secure);
$handle=fopen($filename,wb);
flock($handle,LOCK_SH);
$filedata=fread($handle,filesize($filename));
fclose($handle);
function substrs($content,$length) {
if(strlen($content)>$length){
$num=0;
for($i=0;$i<$length-3;$i++) {
if(ord($content[$i])>127)$num++;
}
$num%2==1 ? $content=substr($content,0,$length-4):$content=substr($content,0,$length-3);
$content.=' ...';
}
return $content;
}
for ($asc=65;$asc<=90;$asC++)
{ //strtolower() 此函數在一些服務器會產生亂碼!
if (strrpos($regname,chr($asc))!==false)
{
$error="為了避免用戶名混亂,用戶名中禁止使用大寫字母,請使用小寫字母";
$reg_check=0;
}
}
function openfile($filename,$method="rb")
{
$handle=@fopen($filename,$method);
@flock($handle,LOCK_SH);
@$filedata=fread($handle,filesize($filename));
@fclose($handle);
$filedata=str_replace("\n","\n",$filedata);
$filedb=explode("",$filedata);
//array_pop($filedb);
$count=count($filedb);
if($filedb[$count-1]==''){unset($filedb[$count-1]);}
return $filedb;
}