Opening a file to manipulate it

From: Date: Sun, 17 Nov 2002 03:45:02 +0000
Subject: Opening a file to manipulate it
Groups: php.general 
Request: Send a blank email to php-general+get-124760@lists.php.net to get a copy of this message
Hello, Extreme newbie here (halfway through my first book :) ). I need to open a file, read the whole file into a variable, manipulate it, and then echo it to the screen. I'm doing it right from my book and it's not working. Here's what I have now: <? $header = fopen("header.html","r"); echo $header; ?> It writes "Resource id #1" at the top of the page. What is that?! :) I have also tried using file(). That displays "Array" on the screen. What am I doing wrong? Thanks! Troy

« previous php.general (#124760) next »