简体   繁体   中英

Is it safe to use the standard /tmp folder with upload_tmp_dir in PHP?

I was wondering if there is any security risk when using the default upload_tmp_dir value in the php.ini file? If yes, what are better approaches or places to place these files?

/tmp means temporary. So this folder may normally be cleared regularly. You should create a /upload folder and put your files inside it.

EDIT : Excuse me I didn't anwer properly. I think there is no security risk if the folder is not accessible from the internet. For example outside the www folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM