2009-10-12 96 views
0

我已經使用codeigniter和jquery uploadify爲我的圖片庫。它在我的本地主機上正常工作。我的問題是當我上傳到服務器。codeigniter和jquery uploadify

任何幫助將不勝感激。

在此先感謝

的錯誤是:

我的項目
'Data Loaded: <p>The path to the image is not correct.</p><p>Your server does not support the GD function required to process this type of image.</p>' 

根(codeiguploadify)

這裏是鏈接 http://webberzsoft.com/clients/codeiguploadify/

我已經嘗試過改變我文件夾放到'文件夾'中:'clients/codeiguploadify/uploads',但仍然沒有工作。

<script type="text/javascript"> 
$(document).ready(function() { 
    $("#fileInput2").uploadify({ 
     'uploader'  : 'flash/uploadify.swf', 
     'script'   : 'uploadify/uploadify.php', 
     'cancelImg'  : 'flash/cancel.png', 
     'folder'   : 'uploads', 
     'multi'   : true  
    }); 
}); 

回答

0

從錯誤

Your server does not support the GD function required to process this type of image 

我想說你的本地主機具有所需的GD庫包,和您的其他服務器也沒有。你可以仔細檢查PHP訪問GD

您可以使用下面的PHP代碼檢查這(taken from here):

<?php 
/* Displays details of GD support on your server */ 
echo '<div style="margin: 10px;">'; 
echo '<p style="color: #444444; font-size: 130%;">GD is '; 
if (function_exists("gd_info")) { 
    echo '<span style="color: #00AA00; font-weight: bold;">supported</span> by your server!</p>'; 
    $gd = gd_info(); 
    foreach ($gd as $k => $v) { 
     echo '<div style="width: 340px; border-bottom: 1px solid #DDDDDD; padding: 2px;">'; 
     echo '<span style="float: left;width: 300px;">' . $k . '</span> '; 
     if ($v) 
      echo '<span style="color: #00AA00; font-weight: bold;">Yes</span>'; 
     else 
      echo '<span style="color: #EE0000; font-weight: bold;">No</span>'; 
     echo '<div style="clear:both;"><!-- --></div></div>'; 
    } 
} else { 
    echo '<span style="color: #EE0000; font-weight: bold;">not supported</span> by your server!</p>'; 
} 
echo '<p>by <a href="http://www.dagondesign.com">dagondesign.com</a></p>'; 
echo '</div>'; 
?>