Jump to content

Recommended Posts

Like most that start threads like this. I will have to say I'm pretty new.

 

<head>

<?php include('http://www.example.ca/includes.php'); ?>

</head>

 

The above snippet of code fails to load a site the way I want. However the snippet of code below does work.

 

<head>

<?php include('./includes.php'); ?>

</head>

 

I just need to understand why -

 

Is the first example and path, not the same as the second example?

 

Please and thank you.

Edited by Imprettynew1
Link to comment
https://forums.phpfreaks.com/topic/274228-reason-why-this-works-the-way-it-does/
Share on other sites

Is the first example and path, not the same as the second example?

 

No, the first example makes a request to the url provided. This returns the output of the php script requested after it has already been processed.

 

The second, actually includes the php script into your current script ready to be processed.

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.