首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将代码点火器项目从本地主机上载到活动服务器时遇到的问题

将代码点火器项目从本地主机上载到活动服务器时遇到的问题
EN

Stack Overflow用户
提问于 2015-07-22 12:30:33
回答 3查看 1.2K关注 0票数 0

我开发了一个代码点火器的项目。现在,我想将它从本地主机移到一个活动服务器上。但是我移动了它,网站第一次打开,当我刷新页面时,它只显示空白页。我试过在另一个浏览器中,也有同样的问题。30分钟后,当我试图打开网站,它第一次打开,然后再刷新网站,空白页出现。

关闭浏览器并再次打开它时,该页将第一次打开,然后刷新后,该页面将无法工作,也不会转到其他页面。

我不明白问题出在哪里。请有人来帮我。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2015-07-28 21:00:51

试试这个.htaccess:

代码语言:javascript
复制
<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>
票数 0
EN

Stack Overflow用户

发布于 2015-07-23 06:48:35

折叠是我的config.php文件的内容。

代码语言:javascript
复制
$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; 
票数 0
EN

Stack Overflow用户

发布于 2015-07-24 05:51:08

这是index.php文件。

代码语言:javascript
复制
 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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31563238

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档