PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY Figure (Web host)
PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY Figure 6-2. The $_FILES array contains five important pieces of information about an uploaded file. You can see that the $_FILES array is actually a multidimensional array. The key (or name) of the top-level array comes from the name attribute of the file input field in this case, image. The image subarray consists of five elements, namely name: The original name of the uploaded file type: The uploaded file s MIME type tmp_name: The location of the uploaded file error: An integer indicating any problems with the upload (see Table 6-2) size: The size of the uploaded file in bytes 5. On Windows, open Explorer, and navigate to C:WINDOWSTEMP or the location indicated in tmp_name. On a Mac, open Terminal (it s in Applications:Utilities), and type the following commands, both followed by pressing Return: cd /var/tmp ls -l Don t waste time searching for the temporary file: it won t be there. It really is temporary. If you don t do anything with it immediately after uploading, PHP discards it. It s a highly efficient way of doing things, because it means your server doesn t get clogged up with files that are no longer needed. I ll explain shortly how to handle a file upload, but first let s continue our exploration of the $_FILES array.
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.