Welcome Guest, Not a member yet? Register   Sign In
Tutorial - Static Pages
#1

[eluser]Tybion[/eluser]
I relocated the application and system folders above the root of the web server as suggested in the CodeIgniter Installation Instructions.

As a raw CodeIgniter beginner, I am now running the Static Pages tutorial.

After I had created the first few files, the URL index.php/pages/view kept returning Page Not Found.

After a fair bit of research, I changed the code in pages.php to ..

Code:
if ( ! file_exists(APPPATH.'/views/pages/'.$page.'.php')) {
// Whoops, we don't have a page for that!
show_404();
    }

The tutorial now works.

The code in the tutorial is currently ..
Code:
if ( ! file_exists('application/views/pages/'.$page.'.php')) {
Shouldn't this use the APPPATH definition?
Or is there an even better way to make sure the tutorial works in all cases?



Messages In This Thread
Tutorial - Static Pages - by El Forum - 01-24-2012, 08:18 PM
Tutorial - Static Pages - by El Forum - 01-25-2012, 11:50 AM
Tutorial - Static Pages - by El Forum - 01-25-2012, 03:17 PM
Tutorial - Static Pages - by El Forum - 01-25-2012, 03:29 PM
Tutorial - Static Pages - by El Forum - 01-25-2012, 04:55 PM
Tutorial - Static Pages - by El Forum - 02-20-2012, 10:56 AM
Tutorial - Static Pages - by El Forum - 02-20-2012, 11:40 AM
Tutorial - Static Pages - by El Forum - 02-20-2012, 02:24 PM
Tutorial - Static Pages - by El Forum - 02-20-2012, 09:48 PM
Tutorial - Static Pages - by El Forum - 03-27-2012, 10:11 AM
Tutorial - Static Pages - by El Forum - 07-19-2012, 08:39 PM
Tutorial - Static Pages - by El Forum - 03-27-2013, 02:22 PM
Tutorial - Static Pages - by El Forum - 06-27-2013, 05:33 AM
Tutorial - Static Pages - by El Forum - 07-05-2013, 02:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB