How do I get the PHP Uploads directory?

后端 未结 3 1021
予麋鹿
予麋鹿 2021-02-14 04:03

I have uploaded a file using HTML / PHP and following is the print_r() of the $_FILES[\'file\'] array:

Array
(
    [name] => Chrysanthemum.jpg
    [type] =>         


        
3条回答
  •  终归单人心
    2021-02-14 05:03

    Php file upload temporary directory is a php config variable located on php.ini file.

    You can get the variable config value by using ini_get function.

    $path = ini_get('upload_tmp_dir'); // your code here

提交回复
热议问题