View Single Post
Old 08-22-2005, 12:19 PM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Quote:
Code:
fopen ("$file", "wb");
this is opening the file as Write Binary, I'm not sure that's what you want, when you wan't to use readfile() on it.
If you plan on using readfile(), then you won't need the fopen(), allready your fopen() will lock the file for writing, befor you start reading from it and in php it is not allowed to have a file-pointer which is intended to write to a file, at the same time as you want to read from it.
Code:
 <form name="form1" method="post" action="savefile.php">
<p><span class="consign style2">EDIT FILE:</span><span class="style1"><br>
</span><span class="headerlink">HERE IS YOUR FILE WHICH YOU SELECTED FROM YOUR FILEMANAGER </span></p>
<p><span class="style1">
<textarea name="editarea" cols="60" rows="50" id="editarea"><?php readfile($menu1);?></textarea>
should do it, unless you have a real intention on having to open a filepointer to the file.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote