violetradio Posted June 8, 2009 Share Posted June 8, 2009 Hello guys. Thank you for your time. I am not a pro in PHP and am not looking to be yet. The whole thing fascinates me, but I only need help with a little bit of code I have recently been using this code: <?php if($page) include("$page.php"); else include("advert.php"); ?> I am looking to be able to have one design (in my index.php), and put the above code in, so that people visiting my site can go to index.php?page=PAGENAME. I am doing this so I can quickly and easily change the design. This has been working fine until recently my webhost told me: "We have disabled the remote inclusion functionality on the webcluster your Account is served by. This increases the account security much as this function is very often used to exploit insecure scripts and abuse them to send spam mails or put phishing sites into your account." Do you know a way I could reshape this code to work with my account? It is very much appreciated, and would be lost without you all. Tom Quote Link to comment https://forums.phpfreaks.com/topic/161390-php-include-function-one-page-only-alternative-function/ Share on other sites More sharing options...
will35010 Posted June 8, 2009 Share Posted June 8, 2009 You need to use GET to do that. http://www.w3schools.com/PHP/php_get.asp Quote Link to comment https://forums.phpfreaks.com/topic/161390-php-include-function-one-page-only-alternative-function/#findComment-851710 Share on other sites More sharing options...
Daniel0 Posted June 8, 2009 Share Posted June 8, 2009 You wouldn't want to do that. It makes RFI attacks really easy (Google it). Quote Link to comment https://forums.phpfreaks.com/topic/161390-php-include-function-one-page-only-alternative-function/#findComment-851713 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.