web site directory structure borks ul2menu

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 6th, 2006, 22:45
New Member
Join Date: Jul 2006
Location: United States
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote

  #2 (permalink)  
Old Aug 7th, 2006, 11:14
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
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
Reply With Quote
Reply

Tags
web, site, directory, structure, borks, ul2menu

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 06:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43