Welcome Guest, Not a member yet? Register   Sign In
Why do website not show after uploaded to host?
#5

(06-13-2015, 09:11 PM)riwakawd Wrote:
(06-12-2015, 08:10 AM)myfaith237 Wrote: I has used FileZilla upload all source code of website to host, has imported database successfully, and deleted file default.php in folder public_html , but when I enter the website address, it only shows file welcome.php like this:
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:
application/views/welcome_message.php
The corresponding controller for this page is found at:
application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.  

After I set ../application/config/routes.php like this :




PHP Code:
$route['default_controller'] = "cHome"  
cHome is controller of home page of website, it shows error like this :
404 Page Not Found

The page you requested was not found.

I've replaced the other controllers on it but still have the same result, try site_url() or base_url() function, it shows error like this function is not defined. Source I uploaded not to modify configuration anything. I don't understand why. Everybody help me. Thanks!


I would change the controller to some thing like Chome.php


PHP Code:
<?php

class Chome extends CI_Controller {
 
  public function index() {
 
  }



Then routes $route['default_controller'] = "chome";

or

$route['default_controller'] = "chome/index";

My controller cHome.php like this :
PHP Code:
class CHome extends CI_Controller{
 
   public function __construct() {
 
       parent::__construct();
 
   }
 
    
    public 
function index(){
    ...
    }

Regardless I configured file routes.php like this :
PHP Code:
$route['default_controller'] = "cHome"
or 
PHP Code:
$route['default_controller'] = "chome"

the result was still not changed.
Reply


Messages In This Thread
RE: Why do website not show after uploaded to host? - by myfaith237 - 06-14-2015, 03:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB