hi folk
im new to this forum ang i wonder if i could get some help
my problem this error pops up
Warning: fread(): Length parameter must be greater than 0. in /home/djdeano/public_html/loginwarrior/admin/index.php on line 268
and the script is this that it is read from
<?php
$loadcontent = "../advanced_members/$u_name.txt";
if($save_file) {
$savecontent = stripslashes($savecontent);
$fp = @fopen($loadcontent, "w");
if ($fp) {
fwrite($fp, $savecontent);
fclose($fp);
print '<a href='.$_SERVER[PHP_SELF].'>Refresh</a>';
print "<html><head><META http-equiv=\"refresh\" content=\"0;URL=$_SERVER[PHP_SELF]\"></head><body>";
}
}
$fp = @fopen($loadcontent, "r");
$loadcontent = fread($fp, filesize($loadcontent));
$lines = explode("\n", $loadcontent);
$count = count($lines);
$loadcontent = htmlspecialchars($loadcontent);
fclose($fp);
for ($a = 1; $a < $count+1; $a++) {
$line .= "$a\n";
}
?> <center>
<form method=post action="index.php?userinfo=<?php echo "$u_id" ?>">
<input type="submit" name="save_file" value="Save">
<table width="90%" valign="top" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="3%" align="right" valign="top"><pre style="text-align: right; padding: 4px; overflow: auto; border: 0px groove; font-size: 12px" name="lines" cols="4" rows="<?=$count+3;?>"><?=$line;?></pre></td>
<td width="87%" align="center" valign="top"><textarea style="text-align: left; padding: 0px; overflow: auto; border: 3px groove; font-size: 12px" name="savecontent" cols="60" rows="10" wrap="OFF"><?=$loadcontent?></textarea></td>
</tr>
</table>
<br>
</form>
The refered to error is in purple ..
any help to recitfy this will be greatfull
souldude
Need a little helperror or warning
Page 1 of 1
2 Replies - 1281 Views - Last Post: 01 July 2005 - 10:34 AM
Replies To: Need a little help
#2
Re: Need a little help
Posted 01 July 2005 - 09:51 AM
The error is noting that the length of the file returned by your call to filesize is zero...this means either the file may not exist, or has nothing in it.
#3
Re: Need a little help
Posted 01 July 2005 - 10:34 AM
ok thanks
i'm new to all this .
i'm new to all this .
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|