CodeIgniter Forums

Full Version: where to place images folder in codeigniter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]belbek[/eluser]
where to place images folder in codeigniter and what's the path to it?

El Forum

[eluser]Yash[/eluser]
You can use base_url() and can place image folder anywhere.

for ex you can put image folder where you have your system folder.

to access image
Code:
<?=base_url()?>image/image.jpg

El Forum

[eluser]belbek[/eluser]
thx

El Forum

[eluser]Colin Williams[/eluser]
Or just host it right off of your webroot and do something like
Code:
<img src="/images/smile.gif" alt="">

El Forum

[eluser]Sphinter[/eluser]
Im with template library (http://www.williamsconcepts.com/ci/codei.../template/) working, but my template wont access images/javascript/styles files i using baseurl at masterpage but it wont work =(

Code:
&lt;base href="http://pefexport/" /&gt;

My files are at root folder like system folder.

Some can help me? ty =)

El Forum

[eluser]Colin Williams[/eluser]
Sphinter, please post the URL where you assets exist and then post the URL that is being generated by the Template class. If they are one in the same, your &lt;base&gt; tag might be causing the issue. Also, are you echoing $_styles and $_scripts in your master template? (Template does nothing funny with paths. It just prefixes the paths you provide with the base_url you configured in $config)

El Forum

[eluser]Sphinter[/eluser]
Colin i found the error, was at my .htaccess config. Anyway thx for help man Wink

El Forum

[eluser]Colin Williams[/eluser]
Ahah! Good to hear.