2011-01-22 109 views
1

我在wamp上開發了Codeigniter 1.7.2,它幾乎完成。現在我試圖在IIS 7上託管它(是IIS!因爲提供給我的控制面板只有IIS),我收到了錯誤。這就是我得到: -在IIS上部署代碼點火器1.7.2應用程序7

Warning: require(system/codeigniter/Common.php) [function.require]: failed to open stream: No such file or directory in c:\abc\wwwroot\system\codeigniter\CodeIgniter.php on line 38 

Warning: require(system/codeigniter/Common.php) [function.require]: failed to open stream: No such file or directory in c:\abc\wwwroot\system\codeigniter\CodeIgniter.php on line 38 

Fatal error: require() [function.require]: Failed opening required 'system/codeigniter/Common.php' (include_path='C:\Program Files (x86)\PHP\pear;./;./includes;./pear') in c:\abc\wwwroot\system\codeigniter\CodeIgniter.php on line 38 

不用說我完全糊塗了它給什麼錯誤,我應該怎麼做才能解決這個問題。

請幫幫我。我已經GOOGLE了,發現它有一些htaccess的問題。這是我的htaccess文件: -

Options +FollowSymLinks 
IndexIgnore */* 

<ifmodule mod_rewrite.c> 
RewriteEngine on 

    # if a directory or a file exists, use it directly 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 

    # otherwise forward it to index.php 
    RewriteRule ^(.*)$ index.php/$1 [L] 

</ifmodule> 

我不知道如何轉換它以及在web.config中寫什麼。任何幫助,將不勝感激。我正在使用websitepanel來部署網站。

在此先感謝:)

+0

看起來像微軟使用'\`而不是`/`的事情,但我不是IIS的人,所以我不知道。 – jondavidjohn 2011-01-22 19:40:29

+0

`第38行中的c:\ abc \ wwwroot \ system \ codeigniter \ CodeIgniter.php中沒有這樣的文件或目錄 - 對我來說似乎很自我解釋?所有文件都在正確的目錄中嗎? – Ross 2011-01-22 19:42:14

回答

2

也許是這樣嗎?你應該在你的webroot的index.php中找到下面的代碼。問題是,你指定了一個完整的服務器路徑嗎?確保您使用的是完整的服務器路徑,不僅來自webroot,還來自您的index.php文件中* $ system_folder *和* $ application_folder *變量的域文件夾。我希望這可以幫助/

/* 
|--------------------------------------------------------------- 
| SET THE SERVER PATH 
|--------------------------------------------------------------- 
| 
| Let's attempt to determine the full-server path to the "system" 
| folder in order to reduce the possibility of path problems. 
| Note: We only attempt this if the user hasn't specified a 
| full server path. 
| 
*/ 
if (strpos($system_folder, '/') === FALSE) 
{ 
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) 
    { 
     $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder; 
    } 
} 
else 
{ 
    // Swap directory separators to Unix style for consistency 
    $system_folder = str_replace("\\", "/", $system_folder); 
}