Jump to content

nic james

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nic james's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it still doesnt seam to work... mmm :/ here is what its displaying:
  2. the text file is in the same directory, what that code does is show the code itself and not the text. right now the website is offline in a folder on my hardrive. the index.php and indexbody.txt are in the same directory, im using firefox to open the index.php, and im designing the site with dreamweaver. thanks -nic ^^
  3. ok, i put this in and it still doesnt work, it seams to display the code itself and not the text file (sorry im new to php) <?php echo '<pre>'; include('indexbody.txt'); echo '<pre>'; ?>
  4. im working on my website and im trying to insert text from a file into the webpage. the webpage is index.php the .txt file is indexbody.txt at the point of where the code is i would like to insert the contents of the text file into the html document so the person viewing the site can read it as if it was directly in that webpage. i hope you understand what im asking the current not working code is: <?php $myFile = "indexbody.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, 5); fclose($fh); echo $theData;?>
×
×
  • 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.