Welcome Guest, Not a member yet? Register   Sign In
Where does the main content go?
#1

[eluser]General1337[/eluser]
I've been spending a while looking for where the main content goes like images, stylesheets, etc. I can't find where it would go. I tried putting it in the root directory and was unsuccessful. Any help would be appreciated thanks!
#2

[eluser]Pascal Kriete[/eluser]
Your static content can go anywhere on your server. Most people create an asset folder in their ci-root. Remember that your paths will be relative to index.php.

Also, if you're using .htaccess make sure to exclude the asset folder.
#3

[eluser]General1337[/eluser]
Well that's what i've been trying so lets say i'm going to use images on a page(view) so I would set the paths to images/whatever.jpg. inside the root folder where index.php is I have the images folder and the <whatever.jpg> inside. it's not working when I tried that.
#4

[eluser]Pascal Kriete[/eluser]
Hmm, following scenario:

CI-Root:
www.example.com/myci/index.php

Image
www.example.com/myci/images/test.png

CI View
img src="/myci/images/test.png"
or
img src="./images/text.png"
#5

[eluser]General1337[/eluser]
I tried both of those but was unsuccessful with both...
#6

[eluser]Pascal Kriete[/eluser]
Are you using a .htaccess file? If so, could you post the contents?
#7

[eluser]General1337[/eluser]
No I am not using one, also when I call which directory everything is in it says it's in the CI folder, which is right where it should be... Also I used an absolute URL and it didn't display any images, it's just not displaying images in total.
#8

[eluser]General1337[/eluser]
<deleted>
#9

[eluser]General1337[/eluser]
Alright I checked if I was getting any errors, all the logs say that are important and have anything to do with an error is: ERROR - 2008-05-11 11:39:07 --&gt; 404 Page Not Found --&gt; I don't know why it's saying page not found because the page works, I know for a fact the images work as well, it reads the images, I tried using a URL directly to it(www.google.com/whateverhtegoogleimageis.jpg) and that worked perfectly, but using it from the local folder doesn't work at ALL.
#10

[eluser]Pascal Kriete[/eluser]
This doesn't sound like a CodeIgniter issue. Image requests aren't routed through CI, they're just done normally. Can you access an image if you just place it in your server root?




Theme © iAndrew 2016 - Forum software by © MyBB