Welcome Guest, Not a member yet? Register   Sign In
Help, trying to go beyond the install
#1

[eluser]Unknown[/eluser]
I've installed CI 2.0 on WAMP. I previously installed it on xampp and even wamp the first time. I'm going through Jeff Way's tutorial and got stuck right at the beginning. I am trying to access the Site class (with echo 'hello world' as the output). It seems I get to this point and I keep getting the attached error message. When I go into the index file to fix it as per the error message, it's to no avail. It's stumped me for a couple of days now.

Below is the site.php file

<?php

class Site extends Controller {
function index() {
echo 'hello world';
}
}


After I set the index.php system folder and application folder file, I get this message:

Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

I've set it to
$system_path = "/localhost/wamp/www/CI/system";
$system_path = "c://localhost/www/CI/system";
$system_path = "/CI/system";

same with the application folder. When I switch it back to $system_path = "system"; I get the same attached error message about the class Controller.

I've also set the config file properly as per install instructions.

Thanks for any insight you can give.
#2

[eluser]InsiteFX[/eluser]
For one you need to change all Controller to CI_Controller and all Model to CI_Model

system foler should point to where your CI system folder is

it is relative to your index.php file.

so if your directory is:

CI
-- system
-- application
index.php

then $system_path = 'system' and $application_folder = 'application'

If it still does not work try changing the application/config.php to $config['uri_protocol'] = 'REQUEST_URI';
or some other value.

InsiteFX
#3

[eluser]Unknown[/eluser]
the CI_ prepended to Controller is what made it happen. Thanks. problem solved.




Theme © iAndrew 2016 - Forum software by © MyBB