Here is a code that i tried to design but it wornd work.. can someone plz tell me what m i doing wrong? <?php $folder=$_GET['folder']; include ('.$folder.'/main'.php'); ?> PHP:
<?php if(isset($_GET['folder']) && !empty($_GET['folder'])){ $folder= $_GET['folder']; include ($folder . "/main.php"); }else{ echo "Hello there!"; } ?> PHP: Note: Make sure to verify the $_GET[] values and make it open only certain pages/folders or otherwise you'll make hackers access other folders/files Thanks
Assuming you have ?folder=something <?php $folder=$_GET['folder']; include ("$folder/main.php"); ?> PHP: Or as above run a check