?page=login

Gestart doorWouter10 reacties51 weergaven

11 berichten · pagina 1 van 1

Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
Wat is het voordeel van zon index.php?p=login ?
Heeft dit te maken met layout ?

mvg
Wouter
0
Krm

Lid

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja het heeft me de layout te maken
het is handig als je geen zin hebt om in elke pagina een layoutje omheem te doen
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Je hoeft dan in de index maar 1x header / footer te includen, de content haal je dan op via wat achter de p staat.
0
Berichten
2.837
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar hoe maak je dat dan bloos..
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
include header
$_GET[p], vervolgens p includen vanuit een map.
include footer
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je moet ook } gebruiken enzo, maar je kan op google zoeken: Paginasysteem.
0
Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
oke laten we zeggen, ik heb index.php
heb ik een mooie layout voor, en nu wil ik tussen
en
die pagina zetten.
wat moet ik precies doen ?
als mijn pagina nu index2.php is

mvg
Wouter !
0
Tim

Lid

Berichten
712
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<html>

[hier je header dingen]

<div>

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pagina[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]2[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]index2.php[/COLOR][COLOR= #007700];
}[/COLOR]

?>

</div>

[hier je footer html]

</html>


als je nu achter je url ?pagina=2 zet wordt index2.php geinclude tussen de
tags
0
Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
Tim schreef:
<html>

[hier je header dingen]

<div>

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pagina[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]2[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]index2.php[/COLOR][COLOR= #007700];
}[/COLOR]

?>

</div>

[hier je footer html]


</html>
als je nu achter je url ?pagina=2 zet wordt index2.php geinclude tussen de
tags

oke en als ik nu index2.php, rarepagina.php, blabla.php en login.php heb?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/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/error.php[/COLOR][COLOR= #007700]);
}[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR]
?>


in de map pages zet je je paginas en dan roep je ze aan door
index.php?p=*naamvanbestand, zonder .php*
0
Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
Rik schreef:
[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/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/error.php[/COLOR][COLOR= #007700]);
}[/COLOR]

[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR]
?>
in de map pages zet je je paginas en dan roep je ze aan door
index.php?p=*naamvanbestand, zonder .php*

Oke ik snap het, dankjezeer !
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