Welke browser test je het mee? En hoe zien de eerste regels van je .svg file eruit?
Kleine Vragen Topic #1
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="900px" height="89px" viewBox="0 0 396 89" enable-background="new 0 0 396 89" xml:space="preserve">
<text transform="matrix(1 0 0 1 145.3696 45.8281)" fill="#48B649" font-family="ArialMT" font-size="30">iPlaylist</text>
<text transform="matrix(1 0 0 1 126.8994 67.4834)" fill="#48B649" font-family="ArialMT" font-size="12">De website voor jou muziek</text>
</svg> SVG file
(heb width en height beetje aangepast voor vector test)
Test het met Safari op Mac.
Met een andere include ik dit bestand en dan doe ik er een omheen
Je snapt dat je afbeeldingen niet kan includeren?
Vinden jullie dat er nog wat meer op deze "wacht tot binnenkort" pagina moet?
Want die blijft staan tot site af is...
http://www.sander.vanmarijn.nl
Want die blijft staan tot site af is...
http://www.sander.vanmarijn.nl
Aarclay schreef:Kan je SVG ook met de Afbeelding niet beschikbaarDe oorspronkelijke afbeelding of link ontbreekt. tag doen dan?Je snapt dat je afbeeldingen niet kan includeren?
Dat wist ik namelijk niet
Dylanh schreef:Ik wil de save functie voor elke GET uitvoeren:Dat weet ik ook wel, maar ik weet niet wat hij precies wilt doen.Eerdere citaten tonen
Raaoul schreef:Dit is niet heel netjes, want nu kan je dus als hackert eigen het waardes meegegeven.Eerdere citaten tonen
Rogier schreef:Je weet toch dat $_GET en $_POST arrays zijn, dus dan is het toch simpel?Eerdere citaten tonen
Raaoul schreef:@ ^[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$value[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700]; }[/COLOR] ?>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] save[COLOR= #007700]([/COLOR][COLOR= #0000BB]$value[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$getname[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]=[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$getname[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$getname[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/return"]return[/URL][COLOR= #007700];
}
function[/COLOR] get[COLOR= #007700]([/COLOR][COLOR= #0000BB]$open[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$open[/COLOR][COLOR= #007700]];
}[/COLOR]
?> Iemand?

Dus dat je alle $_GET in $_SESSION stopt?
Dylan, Niemand snapt wat je bedoeld..
Leg het eff beter uit
Leg het eff beter uit
Ik leg het nog een keer uit;
Ik ben bezig met met index.php die haalt de bestanden op uit de map Templates.
Bijvoorbeeld: Als mijn URL http://localhost/Test haalt index.php dus de pagina test.php uit de map Templates.
Alleen het probleem is als ik http://localhost/Test?a=Hallo doe dat de GET dus niet mee genomen word naar de pagina. Dus daarom heb ik deze funcities gemaakt;
Nu heb ik dus dat de GET opgeslagen word in een sessie. Maar ik moet voor elke GET de save functie laten doen en daar heb ik problemen mee. Ik heb nu dit in de index.php;
Als ik nu dit heb: http://localhost/test?a=a dan is mijn output:
En zo wil ik het:
Owja, de htaccess:
Ik ben bezig met met index.php die haalt de bestanden op uit de map Templates.
Bijvoorbeeld: Als mijn URL http://localhost/Test haalt index.php dus de pagina test.php uit de map Templates.
Alleen het probleem is als ik http://localhost/Test?a=Hallo doe dat de GET dus niet mee genomen word naar de pagina. Dus daarom heb ik deze funcities gemaakt;
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] save[COLOR= #007700]([/COLOR][COLOR= #0000BB]$value[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$getname[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]=[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$getname[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$getname[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/return"]return[/URL][COLOR= #007700];
}
function[/COLOR] get[COLOR= #007700]([/COLOR][COLOR= #0000BB]$open[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$open[/COLOR][COLOR= #007700]];
}[/COLOR]
?> Nu heb ik dus dat de GET opgeslagen word in een sessie. Maar ik moet voor elke GET de save functie laten doen en daar heb ik problemen mee. Ik heb nu dit in de index.php;
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]./Modules/Get.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$allow[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]test[/COLOR][COLOR= #007700]);[/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]url[/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]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$allow[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].html[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$more[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]?[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$more[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$more[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$gets[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$gets[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]// De echo is alleen voor de test en zou later als het werk verangen worden door de functie save[/COLOR]
[COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/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/echo"]echo[/URL] [COLOR= #DD0000]403[/COLOR][COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]404[/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]Templates/index.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?> Als ik nu dit heb: http://localhost/test?a=a dan is mijn output:
t= En zo wil ik het:
a=a Owja, de htaccess:
RewriteEngine On
RewriteRule ^(|/)$ index.php?url=$1
RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1
RewriteEngine on
RewriteRule ^(.*).htm$ $1.php [NC] Sanderc schreef:- CountdownVinden jullie dat er nog wat meer op deze "wacht tot binnenkort" pagina moet?
Want die blijft staan tot site af is...
http://www.sander.vanmarijn.nl
- Uitleg of verduidelijking wat het (ongeveer) is?
Nielsie schreef:Nu wel duidelijk btw?Dylan, Niemand snapt wat je bedoeld..
Leg het eff beter uit
Dylanh schreef:Ik leg het nog een keer uit;
Ik ben bezig met met index.php die haalt de bestanden op uit de map Templates.
Bijvoorbeeld: Als mijn URL http://localhost/Test haalt index.php dus de pagina test.php uit de map Templates.
Alleen het probleem is als ik http://localhost/Test?a=Hallo doe dat de GET dus niet mee genomen word naar de pagina. Dus daarom heb ik deze funcities gemaakt;
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] save[COLOR= #007700]([/COLOR][COLOR= #0000BB]$value[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$getname[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]=[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$getname[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$getname[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/return"]return[/URL][COLOR= #007700];
}
function[/COLOR] get[COLOR= #007700]([/COLOR][COLOR= #0000BB]$open[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$open[/COLOR][COLOR= #007700]];
}[/COLOR]
?> Nu heb ik dus dat de GET opgeslagen word in een sessie. Maar ik moet voor elke GET de save functie laten doen en daar heb ik problemen mee. Ik heb nu dit in de index.php;
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]./Modules/Get.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$allow[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]test[/COLOR][COLOR= #007700]);[/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]url[/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]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$allow[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].html[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$more[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]?[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$more[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$more[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$gets[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$gets[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]// De echo is alleen voor de test en zou later als het werk verangen worden door de functie save[/COLOR]
[COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/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/echo"]echo[/URL] [COLOR= #DD0000]403[/COLOR][COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]404[/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]Templates/index.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?> Als ik nu dit heb: http://localhost/test?a=a dan is mijn output:
t= En zo wil ik het:
a=a Owja, de htaccess:
RewriteEngine On
RewriteRule ^(|/)$ index.php?url=$1
RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1
RewriteEngine on
RewriteRule ^(.*).htm$ $1.php [NC] $_GET doet het gewoon in je includes hoor

toevoeging op 3 januari 2013, 10:45:21:
Als je $_GET 1 op 1 gaat kopieren naar je sessies dan zit je mooie beveiligingslekken te maken, dus dat moet je niet doen.
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]page.php?[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$more[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]
?> Werkt niet heb ik al lang getest?
Ja, zo niet maar dat heb je ook niet nodig. Als je dit doet:
dan kun je in page.php gewoon $lala gebruiken, en ook $_GET als die in de URL wordt meegegeven.
[COLOR= #0000BB]<?php
$lala[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]po[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]page.php[/COLOR][COLOR= #007700];[/COLOR]
?> dan kun je in page.php gewoon $lala gebruiken, en ook $_GET als die in de URL wordt meegegeven.
Dan werkt het nog steedst niet:
index:
Test.php:
URL: http://localhost/test?a=a
index:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]./Modules/Get.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$allow[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]test[/COLOR][COLOR= #007700]);[/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]url[/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]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$allow[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].html[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/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/echo"]echo[/URL] [COLOR= #DD0000]403[/COLOR][COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]404[/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]Templates/index.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?> Test.php:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]a[/COLOR][COLOR= #007700]];[/COLOR]
?> URL: http://localhost/test?a=a