Jump to content

includes


hchsk

Recommended Posts

how can i include a .php file that needs to be executed and contains relative links, from a different folder, without that screwing up the relative links. (i say screwing up, it's doing what it's supposed to, but in this particular case is not what i want).

 

can exec() be used to do this? i was confused by the php manual

Link to comment
Share on other sites

and why might i get this error message when i attempt an absolute url? a relative path works when i call the page itself, not from an include

 

 

 

Warning: fopen(http://www.lowersouthlounge.com/teambonuscheck.txt) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/.ibycusdryer/cyprinid/lowersouthlounge.com/scripts/report.php on line 39

Link to comment
Share on other sites

when you include a file that has relative links in it, the relative paths become relative to the file that is including that included file.

 

as far as the warning: when you use a full url like that, fopen attempts to open it via http protocol, and apparently your server is not setup to allow that (or it could be outside a publicly accessible folder).

 

make the links in the included file relative to the file that is including the included file.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.