SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    displaying the contents of a file

    I have 2 files named "test.htm" and displayContents.php like the below, the would-be code below doesn't work correctly, but I hope it show what I want.
    Code:
    all code in "test.htm"
    
    This is a test page.
     
    would-be code in "displayContents.php"
    
    $displayContents=read(test.htm);
    
    echo $displayContents;
    
    result of "displayContents.php"
    
    This is a test page.
    How can I get the result above when I browse "dispalyContents.php"?

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    51
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Code:
    echo file_get_contents('test.htm');


Bookmarks

Posting Permissions

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