move_uploaded_file(…): failed to open stream: No such file or directory

后端 未结 2 1330
囚心锁ツ
囚心锁ツ 2021-01-13 07:35

I try to insert images in my database with PHP and MySQL with a temporary folder.

I use laravel and this is my controller:

if(isset(         


        
2条回答
  •  再見小時候
    2021-01-13 08:17

    In your Config file or some common file define your path as below

    define('DOCROOT', $_SERVER['DOCUMENT_ROOT'].'/');

    Include this common php in all your class file.

    Then

     $destino= DOCROOT.'Perf_Masc/'.$img; // HERE DOCROOT is defined in config.
    

提交回复
热议问题