So i have problem , I don´t know how to get this example url: index.php?page=foto&action=sky ,
if i know that this script is for index.php?page=foto
<?php
if (isset($_GET['page'])){
$soubor=$_GET['page'];
$soubor2= dirname($_SERVER['SCRIPT_FILENAME'])."/".$soubor.".inc";
if(file_exists($soubor2)){
if(substr_count($soubor,"../")>0){
echo "error";
}elseif($soubor=="index" or $soubor=="/index"){
echo "error";
header("HTTP/1.0 404 Not Found");
}else{
include $soubor2;
}
}else{
include "error404.inc";
}
}else{
include "index.inc";
}
?>
I am amateur ....Pls help me......thank a lot...
I need help....
Moderator: General Moderators
- markusn00b
- Forum Contributor
- Posts: 298
- Joined: Sat Oct 20, 2007 2:16 pm
- Location: York, England
Re: I need help....
Sorry, what?
That's not nearly enough of a description for anyone to help..
That's not nearly enough of a description for anyone to help..
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: I need help....
I assume you want to get a hold of GET page and action. This should be it:
Code: Select all
<?php
if (isset($_GET['page']) && isset($_GET['action']){
$soubor = $_GET['page'];
$action = $_GET['action'];
// and continue on with your code...
?>