by passing the $_GET variable to the script processing the data, i.e. This can be tracked in various ways, e.g. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. Shorthand notation, as described in this FAQ, may also be used. w here means that I want the file to be open for writing only. Try this: myfile fopen (myEmptyFile.txt, w) The second parameter I have provided in the function w is the mode. If it does not exist, then it will be created. When an integer is used, the value is measured in bytes. If the file exists, then PHP will open the file. Generally speaking, memory_limit should be larger than post_max_size. If memory limit is enabled by your configure script, memory_limit also affects file uploading. ![]() To upload large files, this value must be larger than upload_max_filesize. Updated (explanation/solution) from PHP site ![]() It works fine, if file size is under 10MB (file size limit is 10MB), and I don't want to increase it, I just want to capture an error in PHP. There is a few questions (empty $_POST, $_FILES) like that, but I didn't find any solution, or explanation for it. But when user tries to upload something bigger, both $_POST and $_FILES array are empty (I expected that $_POST will have some values and $_FILES will have some values but will indicate that there is an upload error). But it allows to upload files that only less then 10MB. I have a following problem, I have HTML form that uploads a file with some extra information.
0 Comments
Leave a Reply. |