View Single Post
(#2)
suzkaw suzkaw is offline
Staff
suzkaw is on a distinguished road
 
Posts: 1,232
Join Date: Mar 2006
Location: Belmont, NC
Default 05-23-2006, 09:22 AM

Yes that is possible. Probably the best way to do it would be to have a controller in the index.php file that way it loads the other files depending on the variable passed.

For example:
PHP Code:
if(!empty($_GET['cmd']))
{
    
//need to add error checking and cleaning here
    
$cmd=$_GET['cmd'];    
}

$file = FILESYSTEM_PATH ."modules/modname/$cmd.php";
if (
file_exists($file))
{
    require_once(
$file);
}
else
{
    require_once(
FILESYSTEM_PATH .'modules/modname/index.php');
}


With this if the would request modules.php?mod=modname&cmd=test it would load a file test.php if it existed.


--
Thanks,
Eric Barnes
68 Classifieds

Documentation - Bug Reports - Modifications - My Blog