473,491 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
Create 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,

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

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

inc
config.php
layout.php - require_once('redirect.php')
redirect.php - require_once('config.php')
config.php
contains all the settings... the list of pages and other stuff.

layout.php
is the layout used to draw pages.

redirect.php
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!
Francesco
Oct 11 '07 #1
2 2285
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
..oO(Francesco)
>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.

Micha
Oct 11 '07 #3

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

Similar topics

0
1351
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...
11
1970
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....
0
1235
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,...
12
1198
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:...
6
1489
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...
4
1865
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...
5
2340
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...
1
1787
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...
18
3353
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...
0
7115
marktang
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,...
0
7154
Oralloy
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,...
0
7190
jinu1996
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...
0
7360
tracyyun
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...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
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...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.