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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • 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