pages/yay.php
Bestaat die
Pages is de map en in de mal staat yay.php met de tekst
Bestaat die
Pages is de map en in de mal staat yay.php met de tekst
je moet de home of errorpagina niet aanpassen[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/file_exists"]file_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000].php[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000].php[/COLOR][COLOR= #007700]);
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/404.php[/COLOR][COLOR= #007700]);
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/home.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?> Jellesch schreef:Index.php?p=yay[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/file_exists"]file_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000].php[/COLOR][COLOR= #007700])){[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000].php[/COLOR][COLOR= #007700]); }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/404.php[/COLOR][COLOR= #007700]); } }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]pages/home.php[/COLOR][COLOR= #007700]); }[/COLOR] ?>

Jvdw schreef:Hij bedoeld dat hij de code niet in index.php had gezet maar ik pokedex.php maar dat werkt gewoonLeg het is beter uit tvl,

Tvl schreef:Is de extensie .php ??@Jellesch, dan krijg ik de code te zien...
Quote:
if(isset($_GET[p])){
if(file_exists(pages/ . $_GET[p] . .php)){
include(pages/ . $_GET[p] . .php);
}else{
include(pages/404.php);
}
}else{
include(pages/home.php);
}
?>