Welcome, Guest. Please login or register.

Login with username, password and session length
Pages: [1]   Go Down
Print
Topic: Include alternative  (Read 1055 times)
« on: December 31, 2009, 07:24:06 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 40



PHP Include() doesn't work over multiple directories or over a URL, so do you know if there's any sort of include() alternative I could use? I'm using Iframes right now, but they don't work very well.
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/

 
« Reply #1 on: January 17, 2010, 09:19:37 PM »
kaero Offline
Newbie

View Profile WWW
*
Gender: Male
Posts: 14



What do you mean by it doesn't work over multiple directories? and as far as the url... I am thinking that fopen will opena  url... but I could be wrong... I will try to check it out and respond back again... but put a little more info about what you mean about the multiple directories thing... include should include ANY file...
Report to moderator   Logged
« Reply #2 on: January 17, 2010, 09:53:48 PM »
kaero Offline
Newbie

View Profile WWW
*
Gender: Male
Posts: 14



this is example code from the php site...
Code:
<?php
$handle 
fopen("http://www.example.com/""rb");
$contents '';
while (!
feof($handle)) {
  
$contents .= fread($handle8192);
}
fclose($handle);
?>

Report to moderator   Logged
« Reply #3 on: February 08, 2010, 10:28:29 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 40



this is example code from the php site...
Code:
<?php
$handle 
fopen("http://www.example.com/""rb");
$contents '';
while (!
feof($handle)) {
  
$contents .= fread($handle8192);
}
fclose($handle);
?>

(sorry for the delay)

No, there appears to be something wrong with my account as that doesn't work, and include doesn't work either. PHP is screwy for me.
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/
« Reply #4 on: February 09, 2010, 12:51:15 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,592



fopen is disabled in safe-mode php, please use include() instead.
Report to moderator   Logged

 
Pages: [1]   Go Up
Print
Jump to: