function awardiconIndex($lang,$id){
$content = array();
$dir = "../gamerzone/upload/award/";
if (is_dir($dir)){
$dh = opendir($dir);
chdir ($dir);
while (($file = readdir($dh)) !== false) {
if (is_dir($file) && basename($file)!='.' && basename($file)!='..'){
getDirList($file);
}
else if($this->filename($file) != "." && $this->filename($file) != ".."){
$content[] = $file;
}
}
chdir("../");
closedir($dh);
}
var_dump($content); //印出dir資料夾裡面的全部檔案
}
function filename($file)
{
$path_parts = pathinfo($file);
return basename($file, $path_parts['extension']);
}

cabuchi 發表在 痞客邦 留言(0) 人氣()

在PHP 5.4以前,实现这样的进度条并不容易,主要有三种方法:

使用Flash, Java, ActiveX
使用PHP的APC扩展
(PHP 5.4之前需要另外安裝下載php_apc_3_0_19.dll就可以使用)
使用HTML5的File API

cabuchi 發表在 痞客邦 留言(0) 人氣()

在CI出現錯誤提示:
Message: A non well formed numeric value encountered

是少了strtotime
date
("Y-m-d",strtotime($_GET['start_date']));

cabuchi 發表在 痞客邦 留言(0) 人氣()

隱藏網址上的index.php
把以下程式加到.htaccess裡面(在application裡面可以找到此檔案)
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule^(.*)$ /index.php/$1 [L]

cabuchi 發表在 痞客邦 留言(0) 人氣()

【一】
當匯入excel資料置資料庫時
若有欄位有單引號,會顯示錯誤匯入不進去
解決方式:
單引號再加上右斜線  ’ --->  \'

cabuchi 發表在 痞客邦 留言(0) 人氣()

從錯誤訊息來看是因為使用ZipArchive class沒有先把系統的php zip打開
所以才沒辦法使用。
在Windows的解決方法:

cabuchi 發表在 痞客邦 留言(0) 人氣()

 
下面寫法大錯誤
select distinct * from act inner join pic on act.num=pic.num where num='437'
會產生錯誤訊息:#1052 - Column 'num'  in where clause is ambiguous
原因是因為兩個資料庫的關聯欄位為相同名稱num
所以要用下面方法,把它分別在不同資料表命名成不同名稱(a和b) 

cabuchi 發表在 痞客邦 留言(1) 人氣()

     // echo "<td>" . "<a href='upload_timetable/'" . $row['url'] . ">" . $row['tablename']."</a>" ."</td>";
                                       //本句為錯誤語法! href裡面不用再''

cabuchi 發表在 痞客邦 留言(0) 人氣()

Warning: Cannot modify header information - headers already sent by
Step1. 開啟XAMPP php資料夾裡面的 php.ini 檔。
Step2. 找到「output_buffering」這行,改為「On」,並重啟 Apache services 即可。

 
原來那時候搬移DB到其他台電腦不能跑是我沒有設定....

cabuchi 發表在 痞客邦 留言(0) 人氣()

echo PHP_VERSION;
echo "<br/>".phpversion();
echo phpversion('tidy');

cabuchi 發表在 痞客邦 留言(0) 人氣()

<?
$now = "hallo@hotmail.com";   
if (ereg ("[a-zA-Z0-9\._\+]+@([a-zA-Z0-9\.-]\.)*[a-zA-Z0-9\.-]+", $now)) {   
    echo "$now";
   }
else {   
     echo "此電子信箱為錯誤格式";
     }
?>

cabuchi 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。