How Far With FUNCTION: INCLUDE?
Posted: Sun Nov 27, 2005 4:21 am
Weirdan | Please use
I imagined use instead classes ... but I am not sure...
I really appreciate any feedback for that question.
Poeta_Eletrico
Weirdan | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi Guys & Girls !
I am developing a little project for my own and I am using the same page to output every link within my site. So, when the user hits any link available, I have a $_GET and parse the correct path with, as Ex.: "if ($_GET["x"]){ include ("./path/toincluldepage.php");}elseif... "
I am not sure with but I am perceiving a strange behavior in the status bar of my FIREFOX, when I execute any of these links. I mean: it geting a little much longer to output the requested content. I must inform that, every page has DB access. So I ask you: is there a better way to reduce this or that strange behavior does not have any relation?
That s the condition used to parse any link in the index.php:Code: Select all
if($_GET['add_mst'] || $_POST['add_mst']){
include("./inc/inc_add_mst.php");
}elseif($_GET['add_rsl'] || $_POST['add_rsl']){
include("./inc/inc_add_rsl.php");
}elseif($_GET['add_slp'] || $_POST['add_slp']){
include("./inc/inc_add_slp.php");
}elseif($_GET['app_crd_mst'] || $_POST['app_crd_mst']){
include("./inc/inc_app_crd_mst.php");
}elseif($_GET['app_crd_rsl'] || $_POST['app_crd_rsl']){
include("./inc/inc_app_crd_rsl.php");
}elseif($_GET['app_crd_slp'] || $_POST['app_crd_slp']){
include("./inc/inc_app_crd_slp.php");
}elseif($_GET['crd_app_mst'] || $_POST['crd_app_mst']){
include("./inc/inc_crd_applied_mst.php");
}elseif($_GET['crd_app_rsl'] || $_POST['crd_app_rsl']){
include("./inc/inc_crd_applied_rsl.php");
}elseif($_GET['crd_app_slp'] || $_POST['crd_app_slp']){
include("./inc/inc_crd_applied_slp.php");
}elseif($_GET['balance'] || $_POST['balance']){
include("./inc/inc_balance.php");
}elseif($_GET['pending'] || $_POST['pending']){
include("./inc/inc_pending_cards.php");
}elseif($_GET['lst_mst']){
include("./inc/inc_list_mst.php");
}elseif($_GET['lst_rsl']){
include("./inc/inc_list_rsl.php");
}elseif($_GET['lst_slp']){
include("./inc/inc_list_slp.php");
}elseif($_GET['prod']){
include("./inc/inc_products.php");
}else{ default content - no include for that }I really appreciate any feedback for that question.
Poeta_Eletrico
Weirdan | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]