[SOLVED] Includes again....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

[SOLVED] Includes again....

Post by Dale »

:roll: I have a problem with those stupid includes again....

I put that in:

Code: Select all

<?php include("{$_GET['url']}.php"); ?>
But when i enter the following url: http://www.jasonbucher.com/dale/punbb/i ... p?url=main
It suppose to say: main page (thats what i quickly wrote on there, to see if it works)

But instead it says:
Fatal error: Call to undefined function: inlcude() in g:\apache\htdocs\dale\punbb\index.php on line 26
(And i've just noticed that INCLUDE has been spelt wrong in the error aswell... :))
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

Post by mchaggis »

Try:

Code: Select all

<?php include "{$_GET['url']}.php"; ?>

Have u considered the security implications of the above line tho?

http://www.jasonbucher.com/dale/punbb/i ... c/password

If some1 can trick the include to ignore the .php blah blah blah
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Fatal error: Call to undefined function: inlcude() in g:\apache\htdocs\dale\punbb\index.php on line 27
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Fixed ;)

Thx
Post Reply