Jump to content

413 ERROR


paulman888888

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.