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; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.