Php 在IIS 7上部署CodeIgniter 1.7.2应用程序
我在wamp上开发了一个Codeigniter 1.7.2,它几乎完成了。现在,我试图将其托管在IIS7上(因为提供给我的控制面板中只有IIS),但我遇到了错误。这就是我得到的:Php 在IIS 7上部署CodeIgniter 1.7.2应用程序,php,codeigniter,iis-7,Php,Codeigniter,Iis 7,我在wamp上开发了一个Codeigniter 1.7.2,它几乎完成了。现在,我试图将其托管在IIS7上(因为提供给我的控制面板中只有IIS),但我遇到了错误。这就是我得到的: Warning: require(system/codeigniter/Common.php) [function.require]: failed to open stream: No such file or directory in c:\abc\wwwroot\system\codeigniter\CodeIg
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
我完全搞不清楚它会产生什么样的错误,我该怎么解决它
我已经搜索了网页,发现它有一些访问问题。这是我的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>
Options+FollowSymLinks
IndexIgnore*/*
重新启动发动机
#如果存在目录或文件,请直接使用它
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
#否则将其转发到index.php
重写规则^(.*)$index.php/$1[L]
我不知道如何转换它以及在web.config中编写什么。我正在使用
websitepanel
部署网站。也许就是这个?您应该在webroot的index.php中找到以下代码。问题是,您是否指定了完整的服务器路径?确保您使用的是完整的服务器路径,而不仅仅是webroot,或者index.php文件中*$system\u folder*和*$application\u 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);
}
看起来与微软使用
\
而不是/
有关,但我又不是一个IIS的家伙,所以我真的不知道。第38行的c:\abc\wwwroot\system\codeigniter\codeigniter.php中没有这样的文件或目录
-对我来说似乎很简单?所有文件都在正确的目录中吗?@Ross:-是的,就是这样。没有这样的文件或目录是误导信息。我只是简单地将我的文件夹结构复制到了服务器上,并仔细检查了它,确认server.Excellent上存在Common.php和CodeIgniter.php。不知道你是怎么知道/猜到的!我希望我能给你一半的分数。哈哈。我刚刚开始使用codeigniter创建一个新站点。你问我的时候,我正是在你问的时候。