Hi I am a php learner and I am having some problems while loading images from templates. I will explain everything so hope you can understand my question..
My Folder Structure
WEB SITE NAME
- index.php [default landing page]
+ Images [images folder]
+ css [css folder]
+ templates [templates folder]
|-- header.inc.php [header template]
|-- footer.inc.php [footer template]
+ includes [folder for all classes and variables]
+ js [folder for all js files]
+ contact-us [this is a folder]
|--index.php [this is the file inside the contact-us folder]
+ about-us [this is a folder]
|-- index.php [this is the file inside the about-us folder]
This is the header.inc.php file without some html markups
------------------------------------------------------------------------------
This is a sample main landing index.php page [i added codes only where i get into problems]
------------------------------------------------------------------------------
As you can guess, default index.php file works fine... load both logo and banner images but...
this is the index.php file located under the about-us folder
------------------------------------------------------------------------------
Here only the banner image load because the template file still show the logo image path as "images/phpmadeeasy.jpg" instead of "../images/phpmadeeasy.jpg" so is there any way me to define the default image folder as a variable so i can use that variable to load images from any directory level
Example:
Thanks...........