目前分類:PHP (11)

瀏覽方式: 標題列表 簡短摘要

function awardiconIndex($lang,$id){
$content = array();
$dir = "../gamerzone/upload/award/";
if (is_dir($dir)){
$dh = opendir($dir);

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

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

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

http://www.pureweber.com/article/php-upload-progress/

http://inspire.twgg.org/programming/javascript/item/147-javascript-ajax-tracking-file-upload-progress.html

 

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的解決方法:

一. 在C槽裡面找到php.in
1. 把extension=php_zip.dll前面的分號除去

文章標籤

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

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

     // echo "<td>" . "<a href='upload_timetable/'" . $row['url'] . ">" . $row['tablename']."</a>" ."</td>";

                                       //本句為錯誤語法! href裡面不用再''

 

      echo "<td>" . "<a href=upload_timetable/" . $row['url'] . ">" . $row['tablename']. "</a>". "</td>";

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');

第一行和第二行都可以查詢到你所使用的PHP版本


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

<?
$now = "hallo@hotmail.com";   
if (ereg ("[a-zA-Z0-9\._\+]+@([a-zA-Z0-9\.-]\.)*[a-zA-Z0-9\.-]+", $now)) {   
    echo "$now";
   }

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