0

Facing error while downloading the pdf file from the frontend link on the cloud server

Warning: file_put_contents(invoice-1574071311.pdf): failed to open stream: Read-only file system in file/path/Test.php on line 100

4
  • It means that you do not have write permissions on this folder, also file_put_contents needs a second parameter with the contents. – pontikos Nov 20 '19 at 17:07
  • It means that you do not have write permissions on this folder, also file_put_contents needs a second parameter with the contents. – pontikos Nov 20 '19 at 17:07
  • @pontikos yes I've added content as a second argument but how can I download files with the Read-only folder? – Dj3 Nov 20 '19 at 17:19
  • 1
    You should put the contents in pub/media not where your class is. – pontikos Nov 20 '19 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.