0

I am trying to upload a file in the host but I get this msg, knowing that it is working well in the localhost

file_get_contents(): data:// wrapper is disabled in the server configuration by allow_url_fopen=0

my controller code:

    Image::make(file_get_contents($back))->save($path_b);     
  • This means that `$back` contains a URL (versus a local file name) and your server has disabled PHP's ability to open URLs as if they were local files. If you have the ability to change your server's config, you can set `allow_url_fopen=1` in your php.ini file. – Alex Howansky Dec 29 '21 at 21:36
  • is it safe to do it? and how can I edit it? where is located? –  Dec 29 '21 at 21:38
  • _"it safe to do it?"_ It's as safe as any other means to pull data from a remote URL. _"where is located"_ The output of `phpinfo()` will tell you where your `php.ini` file is. – Alex Howansky Dec 29 '21 at 21:42
  • What does $back contain? – Snapey Dec 30 '21 at 04:51

0 Answers0