Sunday, June 26

What is the significance of MAX_FILE_SIZE in file uploads

What does
<input type="hidden" name="MAX_FILE_SIZE' value="4194304" /> actually do?

I found the answer here

The value parameter is in bytes

If you upload a file size greater than 4MB you will never get a client side warning (as expected). The main purpose of this is to impose a soft limit on server side.

if you have imposed a MAX_FILE_SIZE of 2MB and the user tries to upload a 4MB file, once they reach roughly the first 2MB of upload, the transfer will terminate and the PHP will stop accepting more data for that file. It will report the error on the files array.

It's only supposed to send the information to the server. The reason that it must precede the file field is that it has to come before the file payload in the request for the server to be able to use it to check the size of the upload.

Thursday, June 23

Javascript and Jquery Basic Syntax.

Example CodeJavascriptJquery
<input name="vname" type="text" />document.getElementsByName("vname")$("[name='vname']")
<div id="test">document.getElementById("test")$("#test")
<div class="test">document.getElementsByClassName("test")
More information here
<p>Some text</p>document.getElementsByTagName("p")

Wednesday, June 22

Php - Why?

I have been reading a lot these days, reason being am unemployed. Most of the articles i came through read php as a shitty language. I myself have been doing php past 3 years. I kind of believe them now after not getting any job opportunities.

However the bright side is Front-end development is been respected and there are companies which have requirement for Front end developers. This is a department i can score. *Fingers Crossed*