Storing files on a server in a directory that is not shared

I can not find information on how to do this. How can I use PHP so that a user can upload a file on my website and then save this file on my server somewhere, but save it somewhere where no one can find its location? This will be mainly for PDF files, but they can also load TXT or DOC / DOCX files, if that matters.

Any help is appreciated

thank

+3
source share
1 answer

it depends on the setting of your web server.

-, - -, - . ftp, www, public-html, , , .

, !

move_uploaded_file() manual.

move_uploaded_file , -, .

, .htaccess. ( .)

+2

Source: https://habr.com/ru/post/1795803/


All Articles