|
|
|
ช่วยทีคับ ไม่รู้ผิดตรงไหน ช่วยแก้ code นี้ทีคับแก้มา 5 ชั่วโมงยังไม่ได้เลยคับ |
|
|
|
|
|
|
|
ช่วยแก้ code นี้ทีคับแก้มา 5 ชั่วโมงยังไม่ได้เลยคับ
Code
<? function dateShow($datetime) {
$monthname=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
$monthnum=array("01","02","03","04","05","06","07","08","09","10","11","12");
$tmpSplit=split(" ",$datetime);
$datadate=$tmpSplit[0];
$datatime=$tmpSplit[1];
$splitDate=split("-",$datetime);
$output=$splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])."".$splitDate[0]."".$datatime;
return $output;
}
function showIF($ipaddress) {
if($ipaddress<>"::1") {
$tmpSplit=split("\.",$paddress);
$output=$tmpSplit[0].".".$tmpSplit[1].".".$tmpSplit[2].".xxx";
}else{
$output="127.0.0.xxx";
}
return $output;
}
function showAttachfile($imagename) {
if ($imagename<>" "){
$imagesize = getimagesize("attach/$imagename.jpg");
if ($imagesize[0]>$imagesize[1]){
if ($imagesize[0]>$imagesize[1]){
if ($imagesize[0] >150){
$w=150;
$h=($imagesize[1]*150)/$imagesize[0];
}else{
$w=$imagesize[0];
$h=$imagesize[1];
}
}else{
if($imagesize[0] > 150){
$h=150;
$w= ($imagesize[0]*150)/$imagesize[1];
}else{
$w=$imagesize[0];
$w= ($imagesize[0]*150)/$imagesize[1];
}else{
$w=$imagesize[0];
$h=$imagesize[1];
}
}
$output="<img src=\"attach/$imagename.jpg\"width=\"$w\"height=\"$h\"/>";
}else{
$output=" ";
}return $output;
}
function showEmo($detail){
for($i=1;$i<=15;$i++){
$detail=str_replace("[$i]","<img src=\"emo/$i.gif\"/>",$detail);
}
Tag : - - - -
|
|
|
|
|
|
Date :
2010-01-15 17:49:29 |
By :
reddevilpro |
View :
783 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ต้องเป็นเทวดาเท่านั้นที่จะรู้ว่าปัญหามันคืออะไร
|
|
|
|
|
Date :
2010-01-15 17:58:26 |
By :
เซ็งตัวเอง |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
แล้วขึ้น error ว่างัยครับ
|
|
|
|
|
Date :
2010-01-15 20:05:59 |
By :
parita |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quote:Code
function dateShow($datetime) {
$monthname=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
$monthnum=array("01","02","03","04","05","06","07","08","09","10","11","12");
$tmpSplit=split(" ",$datetime);
$datadate=$tmpSplit[0];
$datatime=$tmpSplit[1];
$splitDate=split("-",$datetime);
$output=$splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])."".$splitDate[0]."".$datatime;
return $output;
}
Code
function dateShow($datetime) {
$monthname=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
$monthnum=array("01","02","03","04","05","06","07","08","09","10","11","12");
$tmpSplit=split(" ",$datetime);
$datadate=$tmpSplit[0];
$datatime=$tmpSplit[1];
$splitDate=split("-",$datadate);
$output=$splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])."".$splitDate[0]."".$datatime;
return $output;
}
ฟังก์ชั่นอื่นๆน่าจะถูกหมดแล้ว
|
|
|
|
|
Date :
2010-01-16 00:33:03 |
By :
lozomac |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|