Welcome Guest, Not a member yet? Register   Sign In
Cannot include files
#1

[eluser]porta_ss[/eluser]
Hello ppl, I'm a newby to CodeIgniter and I got into some kind of a problem. First of all I wrote 2 views, header.php and footer.php...each of them containing some html. I placed these 2 inside views/html/
Inside "views" I also have another folder, called "auth" which contains some other views.
The structure is sth like this:
views/
html/
header.php
footer.php
auth/
fail_view.php

Now, I'm trying to include header.php in fail_view.php like this:
Code:
include_once('../html/header.php');
It sais it can't locate ../html/header.php
I'm a little lost...include() works fine in the same directory and if I accss a directory directly like "html/header.php" but in my example above it doesn't work.
The reason why I'm doing this is cause I don't like calling header and footer views from controllers each time I need them...and although it isn't that much of a difference...it is more confortable to me to include these files.
Same problem happens with my css...I had to write the full url in the src to call the external stylesheet...
what should I do?


Messages In This Thread
Cannot include files - by El Forum - 05-12-2009, 07:18 AM
Cannot include files - by El Forum - 05-12-2009, 07:23 AM
Cannot include files - by El Forum - 05-12-2009, 07:44 AM
Cannot include files - by El Forum - 05-12-2009, 07:48 AM
Cannot include files - by El Forum - 05-12-2009, 11:06 AM
Cannot include files - by El Forum - 05-13-2009, 12:59 AM
Cannot include files - by El Forum - 05-13-2009, 03:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB