我在codeigniter中开发了一个项目。现在我想将它从localhost移动到实时服务器。但我移动了它,网站第一次打开,当我刷新页面时,它只显示空白页面。我试过在另一个浏览器中,也有同样的问题。 30分钟后,当我尝试打开网站时,它会第一次打开,然后再次刷新网站时,会出现空白页。
关闭浏览器并再次打开后,页面首次打开,然后刷新后无法进入其他页面。
我不明白问题出在哪里。请有人帮助我。
答案 0 :(得分:0)
Folowing是我的config.php文件的内容。
<?PHP echo form_open_multipart('', array('id' => 'eng_form')); ?>
<?PHP echo form_upload('eng_up_img', '', 'class="" id="eng_up_img" '); ?>
<?PHP echo form_upload('kh_up_img', '', 'class="" id="kh_up_img" '); ?>
<?PHP echo form_upload('ch_up_img', '', 'class="" id="ch_up_img" '); ?>
<?PHP echo form_upload('fr_up_img', '', 'class="" id="fr_up_img" '); ?>
<?PHP echo form_close(); ?>
答案 1 :(得分:0)
这是index.php文件。
switch (dirname(__FILE__)){
case 'C:\wamp\www\ems\public_html' :
$env = 'development';
break;
default :
$env = 'production';
break;
}
define('ENVIRONMENT', $env);
if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break;
case 'testing':
case 'production':
error_reporting(0);
break;
default:
exit('The application environment is not set correctly.');
}
}
$system_path = '../system';
$application_folder = '../application';
请有人应该帮忙,我很麻烦,而且我没有多少时间参与这个项目。 @CodeGodie
答案 2 :(得分:0)
试试这个.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 /index.php
</IfModule>