tims15
12-05-2005, 01:59 PM
Is there a way I can have a php include which pulls up a file from another website? If so, what do the file permissions need to be?
|
Click to See Complete Forum and Search --> : PHP Include tims15 12-05-2005, 01:59 PM Is there a way I can have a php include which pulls up a file from another website? If so, what do the file permissions need to be? phpmyborder 12-05-2005, 02:28 PM try somthing like this include ('http://no2.php.net/manual/en/function.include.php'); tims15 12-05-2005, 04:37 PM What file permissions should the file being included be? LiLcRaZyFuZzY 12-05-2005, 04:43 PM what do you mean by 'file permission' ? you don't need any permission for include, the only argument is the path see http://www.php.net/include/#AEN5177 tims15 12-05-2005, 04:47 PM Like read, write or execute (755, 644 etc) LiLcRaZyFuZzY 12-05-2005, 04:49 PM you don't need them when you use include() (http://php.net/include), but only when you use functions like fopen() (http://php.net/fopen) tims15 12-05-2005, 04:56 PM Mmm... I have put <?php include "http://www.bigwowwebhosting.com/include.php" ?> on another site, however it won't load the file or even change the code (ie, if you view source it just says the above. What am i doing wrong? NogDog 12-05-2005, 05:06 PM 1. Does the host on which the calling file resides support PHP? 2. If so, did you name that file with a .php extension? LiLcRaZyFuZzY 12-05-2005, 05:09 PM is allow_url_fopen enabled? see the warning box on this page : http://www.php.net/include/ scojo1 12-05-2005, 05:13 PM <?php include "http://www.bigwowwebhosting.com/include.php" ?> well, you're missing a ';' at the end of your line, but to echo NogDog if you see everything in between <?php and ?> make sure you have php enabled? LiLcRaZyFuZzY 12-05-2005, 05:24 PM the semi-colon is not required if you only have one statement, as it is a statement delimiter tims15 12-06-2005, 10:42 AM is allow_url_fopen enabled? see the warning box on this page : http://www.php.net/include/ How do I make sure allow_url_fopen is enabled? Is it in the php.ini? LiLcRaZyFuZzY 12-06-2005, 11:00 AM yes it is in the php.ini ;;;;;;;;;;;;;;;;;; ; Fopen wrappers ; ;;;;;;;;;;;;;;;;;; ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On tims15 12-06-2005, 11:11 AM Err... I don't have that command in there, nor do I have an Fopen wrappers section. LiLcRaZyFuZzY 12-06-2005, 11:38 AM what version of PHP? tims15 12-06-2005, 04:05 PM Its PHP version 4.4.1 LiLcRaZyFuZzY 12-06-2005, 04:11 PM is it on local or on a remote server? tims15 12-06-2005, 05:02 PM Its on a local server ;) LiLcRaZyFuZzY 12-06-2005, 05:55 PM dunno, reinstall it, get a new one, it should be set to on and present since 4.3.x webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |