Jump to content
  • 0

This Error On The Site Do Not Know O'que Can Be


Question

5 answers to this question

Recommended Posts

  • 0
Posted

You probably use $_GET to get something from the empty URL.

http://www.mediafire.com/download/c96fwa2x2an1pfm/Web%282%29.rar

 

u could of a look. because I do not understand very well site What do I could do to try to fix this error?

 

I found this php here's a look

<?php
switch($_GET['pag']){
	default:
	include "home.php";
	break;
	
	case 'info':
	include "info.php";
	break;
	
	case 'cp_registro':
	include "cp_registro.php";
	break;	

	case 'cp_mudar':
	include "cp_mudar.php";
	break;	
	
	case 'cp_recuperar':
	include "cp_recuperar.php";
	break;	
	
	case 'downloads':
	include "downloads.php";
	break;	

	case 'doacoes':
	include "doacoes.php";
	break;	
	
	case 'e_geral':
	include "e_geral.php";
	break;	
	
	case 'e_clans':
	include "e_clans.php";
	break;	

	case 'e_sieges':
	include "e_sieges.php";
	break;	

	case 'doacoes_confirmar':
	include "doacoes_confirmar.php";
	break;	

	case 'donate':
	include "donate.php";
	break;
	
	case 'chat':
	include "chat.php";
	break;

}
?>
  • 0
Posted (edited)

Check if isset($_GET['pag']), so if it is - get to the switch, else include the default page.

Edited by Tessa
  • 0
Posted

try my metod :)

<?php
$script = basename( $_GET['page'] );
$dir = 'pages/';
$file = $dir . $script . '.php';
if ( !file_exists( $file ) ) {
  $file = $dir . 'default.php';
}
require( $file );
?>

link will be index.php?page=contacts

  • 0
Posted (edited)

try my metod :)

 

<?php$script = basename( $_GET['page'] );$dir = 'pages/';$file = $dir . $script . '.php';if ( !file_exists( $file ) ) {  $file = $dir . 'default.php';}require( $file );?>
link will be index.php?page=contacts
You will still get this notice if $_GET is empty. So, use isset() which checks if 'page' is in the array.

if (isset($_GET['page'])) {
    // Code depending on $_GET here...
}
I would suggest Symfony's HttpFoundation which takes care about the request/response. Edited by Tessa

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock