Jump to content

Recommended Posts

I want to include a file (lets say test.php) that resides on a server on the intranet.

 

The main file can be accessed from anywhere since it resides on the internet.

 

If someone is on the intranet they will see both files, but if they're at home they will see an error in the <td> that has the include file.

 

How do I suppress errors in the main page for this so that the person will see all of the main file but the include file will give  ablank?

 

Something like this?

<table>

<td> content of main page </td>
<td><?php include "http://intranetserver/directory/test.php" or die (???);?></td>
<td> rest of content from main page

 

BTW, does anyone notice that if you goto phpfreaks.com and sign in, then you click forums it says "welcome guest" and you have to sign in again?? Weird (and ironic for a site specializing in web-design/programming/code)

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/136126-question-on-include/
Share on other sites

BTW, does anyone notice that if you goto phpfreaks.com and sign in, then you click forums it says "welcome guest" and you have to sign in again?? Weird (and ironic for a site specializing in web-design/programming/code)

 

Just thought I would let you know, they are 2 different backends, one is a forum the other is probably a CMS. It is hard to integrate two systems not related to each other for a dual login purpose.

Link to comment
https://forums.phpfreaks.com/topic/136126-question-on-include/#findComment-709888
Share on other sites

Since php on the server where the main file is at is what executes the include statement, it does not matter where you are at when you request the main file. If the include works, it will work for all requests for the main file.

Link to comment
https://forums.phpfreaks.com/topic/136126-question-on-include/#findComment-709895
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.