Pagina index.php?

Gestart doorTwany89 reacties123 weergaven

90 berichten · pagina 2 van 6

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
pages/yay.php
Bestaat die
Pages is de map en in de mal staat yay.php met de tekst
0
Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je snapt het script niet he, je moet je pagina yay.php in je map zetten en dan gewoon ophalen yummie je moet de home of errorpagina niet aanpassen
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
En je moet NIKS aan het script aanpassen!!
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik heb nu de map pages aangemaakt
hoe kan ik er dan inzetten dat ie yay.php pakt
mag ik bijv. home.php veranderen naar yay.php?
0
Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja mag, maar wilje dit zo, post is watje nu hebt.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[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]

?>


Index.php?p=yay
Wordt bestand
Pages/yay.php
Weergegeven
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
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);

}

?>
Jellesch schreef:
[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]

?>
Index.php?p=yay
Wordt bestand
Pages/yay.php
Weergegeven

Ja maar het bestand is pokedex.php
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dan klopt ie nu. Hij werkt nu gewoon.
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja maar ik heb geen index.php maar pokedex.php dus ik heb die code in pokedex.php gezet kan dat ook?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Kan.

Pokedex.php?p=yay
Wordt bestand
Pages/yay.php
Weergegeven
0
Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Leg het is beter uit tvl, biggrin
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@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);

}

?>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Jvdw schreef:
Leg het is beter uit tvl, biggrin
Hij bedoeld dat hij de code niet in index.php had gezet maar ik pokedex.php maar dat werkt gewoon wink
toevoeging op 12 juni 2012, 22:32:00:
Tvl schreef:
@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);

}

?>
Is de extensie .php ??
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Jellesch, dus niet.
Ik krijg de code te zien niet de pagina die ik wil.

En ja, de extensie is .php (yay.php is het bestand)
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Is de extensie .php
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren