Forum Moderators: coopster

Message Too Old, No Replies

fopen displays error

         

Habtom

5:53 am on Apr 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any reason this shouldn't work:

<?php
@$fileopen = $_REQUEST['file5'];
echo @$fileopen;
if (($_REQUEST['submit']))
{
$files = fopen("$fileopen","r");
while (!feof($files)) {
$content .= fgets($files, 4096);
echo $content;
}
}
?>

Habtom

coopster

8:43 pm on Apr 22, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You have your error control operator [php.net] in the wrong place for suppressing the fopen function as you specified in the thread title.


@$fileopen = $_REQUEST['file5'];

hakre

3:35 pm on Apr 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



checkout [php.net...] (handling file uploads) because $_REQUEST['file5'] does not help you getting the temporary name of the uploaded file so fopen throws an error.