Web development lesson 52 simple cms save updating file name in the database part 4



Published
#pashto #cms
Users can upload files to the server by utilizing HTML forms. Until they are transferred to a specified location for permanent storage, these files are kept in a temporary directory. However, we must make sure that a few configuration settings are adjusted correctly in order for the file upload in PHP to function.
Using the rename("SOURCE. FILE", "FOLDER/TARGET. FILE") function in PHP to move files is simple. A file is actually moved into a different folder when it is "renamed" because PHP does not provide a function to relocate files.



All temporary files, including uploaded files, are stored by php in accordance with the temporary files directory that is specified in the php.ini file. Remember that for uploads, the script may delete the files after it removes them.
Category
Web design
Be the first to comment