Jump to content

[SOLVED] Wierd problem with includes


tamumech

Recommended Posts

Hi php freaks.

 

I am having a problem with passing values to my include files.

 

Here's the deal.  In one of my files I might write: (saving this as http://www.mysite.com/file.php)

 

$variable = 'value';
include("http://www.mysite.com/include.php");

 

Where include.php is:

 

echo "$variable";

 

And everything would work fine.

However, if include.php was saved in a different location such as: http://www.mysite.com/subdirectory/include.php, nothing would echo.  I would write:

 

$variable = 'value';
include("http://www.mysite.com/subdirectory/include.php");

 

I don't understand this because I am writing out the full URL.

 

Thanks in advance for your help!

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.