This is a discussion on "web site directory structure borks ul2menu" within the PHP Forum section. This forum, and the thread "web site directory structure borks ul2menu are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
web site directory structure borks ul2menu
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
web site directory structure borks ul2menu
Hello!
I've been working on a customized web site framework in PHP/javascript/CSS, and I'm having trouble due to the fact that I'm insistng on a specific directory structure: / - web site root /includes - includes directory /includes/images - images directory: all web site images are stored here /includes/scripts - directory containing javascripts /includes/styles - stylesheet directory The /includes/styles directory has various stylesheets (one for web, one for printing, etc.) It also has a ul2menu.css file for the main menu. The /includes/scripts directory has a file called ul2menu.js which controls the main menu. I also have the follwing directories which is where I'm having trouble calling the images, scripts, and stylesheets correctly: /Articles - Contains articles for my customers to view /Products - Contains the product pages /Services - Contains services pages. /Support - contains support pages when I use a php in the root dir, which calls the ul2menu JS and CSS, it works fine, but a file in the /Articles directory, for example, will fail to call the CSS and JS correctly. How can I setup PHP to call the files under includes regardless of what directory I'm in? I've tried using relative and full URLs with no luck, and I've tried calling it as a path o the server as well. The customized ul2menu is called by /includes/Header.inc.php, which calls scripts/ul2menu.js and styles/ul2menu.css correctly from any PHP file in the root directory, but fails to call them correctly when in /Articles, /Support, etc. I know how to create variables in PHP and call them, but it's just not working for me. Any ideas? Thanks in advance! Riley |
|
|
|
|||
|
Re: web site directory structure borks ul2menu
Some things might be instalation dependant and also whether you are on a Unix or Windows server but in general; ../ takes you back up a directory so - given your structure, for a file in /Articles to call a file in /inludes/images, for example, the call in the file in /Articles will need to be; ../includes/images/filename |
![]() |
| Tags |
| web, site, directory, structure, borks, ul2menu |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Site Directory Website | qazzy | Starting Out | 3 | Oct 6th, 2007 01:15 |
| Basic Web Site Document Structure | moojoo | Webforumz Cafe | 6 | Jan 28th, 2007 03:34 |
| Web Site Structure Template | moojoo | Webforumz Cafe | 1 | Jan 12th, 2007 17:42 |
| tree structure of directory | begeiste | Introduce Yourself | 6 | Nov 19th, 2006 14:03 |
| Site structure advice | shifty | Classic ASP | 0 | Sep 7th, 2006 19:06 |