Welcome Guest, Not a member yet? Register   Sign In
Performance - base_url()-Call
#1

[eluser]noro[/eluser]
Ok, not that exact title, but dont know what I should use instead.

I am working at an homepage project and I have a question.

At the moment my documents look like this:

Code:
<link rel="stylesheet" href="<?=base_url();?>css/temp.css" type="text/css" />


Is that the best way to call the CSS(JS,AJAX, etc.)-Files?


Is there a difference between href="../css/temp.css" and href="<?=base_url();?>...."?

Otherwise the base_url() method doesn't look that elegant.


Thanx
Noro
#2

[eluser]umefarooq[/eluser]
here is solution for your problem use this library for you javascript and css files.

http://ellislab.com/forums/viewthread/78931/
#3

[eluser]noro[/eluser]
Thanks a lot. Provides also other great stuff.

^^

Is there somethig like this for image-files?

Because writing <img src="&lt;?=base_url()?&gt;/img/" />, my Designer starts to hate me ^^
#4

[eluser]umefarooq[/eluser]
just let me know where you are putting your img foler either in application folder or on the root of you project. then i can help you.
#5

[eluser]noro[/eluser]
I put them in the root folder.

Think, that describes it also::

Ci-RootFolder
|----image
|----js
|----System-Folder
|------------App-Folder




Theme © iAndrew 2016 - Forum software by © MyBB