Hello,
I am trying to troubleshoot this problem using codeigniter.
I am following a tutorial and getting this error after installing the ready-to-use-uncomplete-ci-script. Therefore, I still have to edit things out to make it work, which not all of them is being taught in the tutorial.
----------------------------
// all of this printed out in web browser text
load->model(array('Mediatutorialaccount')); $this->load->helper(array('html','url')); } function index(){ $data['title'] = 'Member only'; $sub_data = array( 'extra_script' => $this->Mediatutorialaccount->extra_script(), 'column_1' => $this->Mediatutorialaccount->update_status(), 'column_2' => $this->Mediatutorialaccount->profile_detail() ); $data['body'] = $this->load->view('_member_area', $sub_data, true); $this->load->view('_output_html', $data); } }
404 Page Not Found
The page you requested was not found.
----------------------------
routes.php
$route['default_controller'] = 'Member_area';
$route['404_override'] = '';
controllers/member_area.php
class Member_area extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->model(array('Mediatutorialaccount'));
$this->load->helper(array('html','url'));
}
function index(){
$data['title'] = 'Member only';
$sub_data = array(
'extra_script' => $this->Mediatutorialaccount->extra_script(),
'column_1' => $this->Mediatutorialaccount->update_status(),
'column_2' => $this->Mediatutorialaccount->profile_detail()
);
$data['body'] = $this->load->view('_member_area', $sub_data, true);
$this->load->view('_output_html', $data);
}
}
views/_member_area.php
<!--script BEGIN-->
<script type="text/javascript">
$(document).ready(function(){
get_html_data(base_url+"profile/show_details/",'', 'profile_detail_loading', 'profile_detail');
});
function edit_detail(){
get_html_data(base_url+"profile/show_details/edit/",'', 'profile_detail_loading', 'profile_detail');
}
function edit_detail_pass(){
get_html_data(base_url+"profile/show_details/edit/pass/",'', 'profile_detail_loading', 'profile_detail');
}
function kembali(){
get_html_data(base_url+"profile/show_details/",'', 'profile_detail_loading', 'profile_detail');
}
<?=$extra_script?>
</script>
<!--script END-->
<style>
#profile_detail table td{
vertical-align: text-top;
}
</style>
<div class="column_1" style="width:400px;">
<?=$column_1?>
</div>
<div class="column_2" style="width:285px;">
<?=$column_2?>
</div>
views/_output_html.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title><?=$title?></title>
<link href="<?=base_url()?>templates/css/general.css" rel="stylesheet" type="text/css" />
<script src="<?=base_url()?>templates/js/functions.js" type="text/javascript" language="javascript"></script>
<script src="<?=base_url()?>templates/js/jquery-1.6.1.min.js" type="text/javascript" language="javascript"></script>
<!-- script lanjutan-->
<script type="text/javascript">
var base_url = "<?=base_url()?>";
</script>
</head>
<body>
<!--BEGIN MAIN DIV-->
<div class="mainDiv">
<?=$body?>
</div>
<!--END OF MAIN DIV-->
</body>
</html>