paulman888888 Posted August 9, 2008 Share Posted August 9, 2008 I have my php script, the script looks in mysql database and finds the file name. Then echos each line, (except the 7 lines i didnt want it to read). The problem is that i get a Request Entity Too Large (a 413 error). The script should work but how do i get rid of the 413 error? I removed the read file part of the script and it worked. So i think i need to change the bottom part of my script. My script <?php $where = isset($_REQUEST['id']) ? "WHERE `id` = '".mysql_real_escape_string($_REQUEST['id'])."' " : ""; $result = mysql_query("SELECT * FROM chess_games $where ORDER BY id ASC"); $row = mysql_fetch_array( $result ); $file = '../user/'.$row['pgn_file'];//This is my file read part. I think this is the problem $fh = fopen($file,"r"); $line = 1; while(!feof($fh)){ if($line > 7){ fgets($fh); $line++; }else{ echo $data; } $line++; } echo $data; ?> Link to comment https://forums.phpfreaks.com/topic/118915-413-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.