www.webdeveloper.com
Results 1 to 2 of 2

Thread: Calling remote file into a .php or cgi file.

  1. #1
    Join Date
    May 2007
    Posts
    4

    Calling remote file into a .php or cgi file.

    I recently inquired about how to have HTML codes inserted into a webpage from a remote file. What I discovered, worked like a charm;

    <!--#include file="example.txt" --> or <!--#include virtual=" example.txt" -->

    However, where this fell short was in calling the remote file into a ‘cgi-bin script’ or .php file. I tried researching a solution which lead me to using the following codes;

    <?php include example.php'; ?> or <?php include example. txt; ?>

    This was unsuccessful. Am I missing anything? Can anyone please offer some advice on what would be the easiest way to have my .php file recognize HTML codes from a remote file?

  2. #2
    Join Date
    May 2007
    Location
    Beijing - China
    Posts
    49
    What do you mean with " This was unsuccessful"...do you get some kind of error or what?

    Try
    Code:
    <?php include("example.php"); ?>
    , make sure the php file is in place.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles