Google "php include()" anders, misschien helpt dat


Shahiem schreef:Dus van al mijn paginas waar de Php komt er .php bestand van maken?Kan je liever een .php bestand van maken en includen.
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]nieuws.php[/COLOR][COLOR= #007700]);[/COLOR]
?> Washand schreef:En dan schrijf je op nieuws.php het nieuws.Je hebt index.php heh, dan zet je[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]nieuws.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]nieuws.php[/COLOR][COLOR= #007700];[/COLOR]
?> Teletext schreef:Dus een apart index.php en apart nieuws.php maken?Eerdere citaten tonen
Washand schreef:Je hebt index.php heh, dan zet je[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]nieuws.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
En dan schrijf je op nieuws.php het nieuws.

[COLOR= #0000BB]<?php
$x[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]114[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$x[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]113[/COLOR][COLOR= #007700]);
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$x[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #DD0000] is meer dan 113[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$x[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #DD0000] is minder dan 113[/COLOR][COLOR= #007700];
}[/COLOR]
?> Teletext schreef:Ik heb nu een nieuwe vraag :
[COLOR= #0000BB]<?php
$x[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]114[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$x[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]113[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$x[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #DD0000] is meer dan 113[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$x[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #DD0000] is minder dan 113[/COLOR][COLOR= #007700];
}[/COLOR]
?> 
Tgrm schreef:Zo werkt hijEerdere citaten tonen
Teletext schreef:Ik heb nu een nieuwe vraag :[COLOR= #0000BB]<?php $x[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]114[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$x[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]113[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$x[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #DD0000] is meer dan 113[/COLOR][COLOR= #007700]; }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$x[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #DD0000] is minder dan 113[/COLOR][COLOR= #007700]; }[/COLOR] ?>
Ik krijg een error dat de 7e regel fout is.
In een PHP editor komt de melding dat het { haakje onder else fout is.

Had wat tekens op verkeerde plekken staan.