<?php echo . $_SERVER[REQUEST_URI]; ?>

Gestart doorAllard11 reacties15 weergaven

12 berichten · pagina 1 van 1

Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik heb de code:

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

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]];[/COLOR]


?>


Maar nu gebruik ik deze code in mijn Direct Admin als 404.shtml. Het script zegt op welke pagina je je bevind. Het woord zegt het al: .shtml geen PHP dus. Heeft iemand deze code maar dan in Javascript?
0
Jort

Lid

Berichten
524
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Met een htaccess kan je je paginas door sturen naar bijvoorbeeld /errors/404.php Hier in werkt het natuurlijk wel. Ik weet de htaccess niet uit me hoofd wink.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Pas in je .htaccess de volgende lijn aan:

Codeblok (.htaccess):

1

ErrorDocument 404 404.shtml

Verander die naar

Codeblok (.htaccess):

1

ErrorDocument 404 404.php

En maak dan 404.php aan met die code er in.
Dan heb je ipv 404.shtml 404.php.
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bedankt!
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar kan de schuine streep er ook uit? met deze code:

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

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]];[/COLOR]


?>
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geen idee, ik weet niet hoe je er iets uit kunt filteren.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Ik neem aan dat je de laatste schuine streep bedoeld?

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

[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700], -[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]

?>
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
nee de eerste er staat dan: /pagina.php die / moet weg
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]

?>


Zo dan yummie
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
biggrinbiggrin Bedankt
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