Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: fryzel20030306

Message # 1016190:
Date: 04/20/03 15:51
By: Rob
Subject: Another suggestion

If you like this method, here's another possible way to do it.

Instead of naming the switch like "index" and then manually putting a line like this in:

$switch = 'index';

You can use $_SERVER['PHP_SELF'] and set that up as your switch condition:

switch ($_SERVER['PHP_SELF']) {
case '/index.php':
require_once('file/to/include.php');
require_once('file/to/also_include.php');

}

Then, on your pages where you would normally put $switch = 'index' just take it out and make sure that the switch gets parse and ran.

Previous Message | Next Message


Comments:
RE: This is a HORRIBLE designFryzel05/07/03 10:34
RE: Another suggestionanon_coward04/30/03 11:54
This is a HORRIBLE designJack04/30/03 08:15
Another suggestionRob04/20/03 15:51
RE: Real MVC frameworkEd Williams04/16/03 12:00
RE: RubbishAlejandro Vasquez04/13/03 12:52
appreciation and suggestionpuzling03/29/03 22:27
RE: RubbishPests03/25/03 11:02
The TruthPriyank03/21/03 01:02
RE: RubbishMichael Peres03/19/03 01:37
Real MVC frameworkAlexandru COSTIN03/14/03 18:45
RE: RubbishIn-Hwan, Kim03/13/03 01:31
O_O!!!Josep03/11/03 04:38
Rubbishanon03/10/03 07:53
So basically...Jester03/08/03 14:29
SimplisticKriek03/07/03 18:45
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.