Page 1 of 1
Using require()
Posted: Sat Jan 03, 2009 1:25 pm
by BillBillJr
When using require() can you grab a file from a website? For example:
Code: Select all
<?php
require("http://www.mysite.com/files/config.php")
?>
Re: Using require()
Posted: Sat Jan 03, 2009 2:16 pm
by califdon
First of all, you have to use correct syntax (php statements must end with a semicolon). Whether you can depends on whether the other site permits you to. It's generally not a good idea, since it will surely slow the response of your page, and puts your page at the mercy of what may change on the other site.