我开发了一个代码点火器的项目。现在,我想将它从本地主机移到一个活动服务器上。但是我移动了它,网站第一次打开,当我刷新页面时,它只显示空白页。我试过在另一个浏览器中,也有同样的问题。30分钟后,当我试图打开网站,它第一次打开,然后再刷新网站,空白页出现。
关闭浏览器并再次打开它时,该页将第一次打开,然后刷新后,该页面将无法工作,也不会转到其他页面。
我不明白问题出在哪里。请有人来帮我。
发布于 2015-07-28 21:00:51
试试这个.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>发布于 2015-07-23 06:48:35
折叠是我的config.php文件的内容。
$config['base_url'] = 'http://mysyite/folder/subfolder/';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
$config['url_suffix'] = '';
$config['language'] = 'english';
$config['charset'] = 'UTF-8';
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = 'MY_';
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
$config['log_threshold'] = 4;
$config['log_path'] = '';
$config['cache_path'] = '';
$config['rewrite_short_tags'] = FALSE; 发布于 2015-07-24 05:51:08
这是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
https://stackoverflow.com/questions/31563238
复制相似问题