473,847 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need help: some advices about webroot structure and organization

Hi there!
I'm trying to organize my sources into a webroot tree like this,

index.htm - only contains index.php into a frame
index.php - require_once('i nc/layout.php')

page1.php - require_once('. ./inc/layout.php')
page2.php - require_once('. ./inc/layout.php')
page3.php - require_once('. ./inc/layout.php')

layout.php - require_once('r edirect.php')
redirect.php - require_once('c onfig.php')
contains all the settings... the list of pages and other stuff.

is the layout used to draw pages.

contains the functions that I use to browse the site.

I have some questions for yoy:

1. is that a good way to structure the site?

2. what about the require_once function?
I mean is it safe to use relative path?

3.What would be te best strategy to manage this structure?

Thanks in advance for your precious help!
Oct 11 '07 #1
2 2300
Jerry Stuckle wrote:
And you're getting responses in that thread. Please don't post the same
problem in more than one thread.
oh, i'm sorry for that...
My init
>>scripts defines some constants, so it's very easy and convenient to load
files from my different paths.

Do you call init in the index.php page?

I do the same. I just include the script to get system-defined values.
Thanks for your help!
Oct 11 '07 #2
>Michael Fesser wrote:
>1) Why frames?
What's wrong with frames?
A lot. "Frames are evil" - you can find a lot of stuff about this topic
on Google and in other web authoring newsgroups.

In short: Frames cause a lot of accessibility and usability problems,
but don't provide real benefits. There are some very rare cases where
frames can be useful, but for most "normal" websites they're not.
>What would be the right way?
No frames, just plain pages.
>My init
scripts defines some constants, so it's very easy and convenient to load
files from my different paths.

Do you call init in the index.php page?
It's a bit more complicated here (all page requests are handled by a
single script), but yes, more or less it's like that. On every request
the init script is called/included to setup some important constants for
the other scripts, which will then handle the request.

Oct 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: rocsolid | last post by:
Current problem deals with three tables in my database. The "DOCUMENTSLIST" table has a one-to-many relationship to the junction table (DOCUMENTS/PROJECTS) which, in turn, has a many-to-one relationship to the "PROJECTS" table. The tables have the following fields: DOCUMENTSLIST DOCUMENTS/PROJECTS PROJECTS Document ID (P key) Documents/Projects ID (P key) Project ID (P key) Type Project ID (F key) Project Name DID Number Document...
by: The_Kingpin | last post by:
Hi all, I'm new to C programming and looking for some help. I have a homework project to do and could use every tips, advises, code sample and references I can get. Here's what I need to do. I have a file named books.txt that contains all the informations on the books. Each book is a struc containing 6 fields written on separated line in the
by: Henry | last post by:
I have a dataset dsMain in which I have two tables The table period has columns like period_id, name, root_org_id.... The table organization has org_id, name, parent_id, hier_path, level, org_index, and period_id. There is a one to many relationship between period and organization, but the organization is actually a hierarchy. period.root_or_id represents the org_id of the root node of the organization hierarchy and that organization...
by: Francois Soucy | last post by:
I've 2 projects in same WEbRoot. Each project has is own Subdirectory. Project #1: /Journal/ '<-- Anonymous /Journal/Admin/ ' <-- WebForm Authentication for each web page Project #2: /Recettes/ '<--- Anonymous /Recettes/Admin/ '<--- WebForm Authentication for each web page I've a Web.Config file that work perfectly for Form authentication. But I
by: encoad | last post by:
Hi everyone, I'm new to C# and I am building website which allows users to fill out various forms. All is going well, however I'm having a bit of trouble with one particular issue. The main page enables users to enter information, and connect to other pages where they can enter additional details. After entering those additional details on the other pages, they are redirected back to the main page. I know I could use Session...
by: John Smith | last post by:
Hello, I'm not sure if these are the appropriate forums for my question since it is closer to about Visual Studio 2005 than it is about .NET framework. So please pardon me and direct me to a different forum if I made a mistake. In any case, thank you for spending the time to read this loooong case and/or for your input. With that said, here's the background of the situation:
by: Will | last post by:
- I know enough ASP and Access to be dangerous :) - I need to put up a data base on our web server with 3 related tables. - They will be accessed by a limited number of people. - Each user will have to "log on" with a username and password and only have access to their records. - Their will be a main table with two associated tables... - This is not the application but it is simmilar in structure... Example:
by: murdla | last post by:
Hello. I am working on a project where users can automatically create personnel advices on the mainframe through a .NET Web Service. My current problem is that I am trying to call a function multiple times to write out the advices to different folder, based on the color sent to the function. However, the program only writes the advices out to one folder. Can you help based on the code that I am attaching to the email?
by: CenturionX | last post by:
Hello everybody, I'm using a webcontrol that gives me two probles: 1. I try to select an item in an html "select-one" control, i modify the value but it does nothing. When i navigate normally i pick the item and then it updates the form. How i can select an item getting the same behavior, using the webbrowser? (http://www.freesms.net/freesms.aspx)
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.