Jump to content

require question


lamonkey

Recommended Posts

When you ask the mydomain.com server for the page http://mydomain.com/header.php, you'll receive the processed version of header.php, not the source page.

 

Example: if header.php is:

<?php
    echo 'Test';
?>

,

you'll receive Test instead of the code above.

 

Had what you ask be possible, all our PHP sites would have been down by now :) It would have been one of the major security risk, to be able to require/include remote files.

Link to comment
Share on other sites

Thanks. Let me ask another way.  On my webpage, I want to call both the header and footer PHP scripts from another URL. Currently it uses the require () command, but since it's not a relative address... it doesn't work. Can any of you PHP gurus give me some advice on how to accomplish this???

 

Again, any help greatly appreciated...

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.