Read file to another server |
HI , i want read file from another server , the file are xls and i want read with phpspreadsheet , i try to use curl :
Code: $client = \Config\Services::curlrequest([ but i have always $code equals to 200 and $reason equal to ok i f file doesn't exist too. How can i check if file exist and read or download ?
(03-25-2024, 06:35 PM)kenjis Wrote: See https://codeigniter4.github.io/CodeIgnit...-responses the documentation doesn't explain how i can get the file ( to read or download) ,there is an example ? i try to : Code: $client = \Config\Services::curlrequest([ But i return a 404 Edit : i miss a x (xslx) now i haven't error , but how can i read the file ? print_r($client->getBody()) return a blank page
I recommend you read the user guide, because it tells everything you need in most cases.
https://codeigniter4.github.io/CodeIgnit...-responses PHP Code: $client = \Config\Services::curlrequest();
(03-26-2024, 05:07 PM)kenjis Wrote: I recommend you read the user guide, because it tells everything you need in most cases. sorry but Code: file_put_contents Build your first application part...
file_put_contents() is a basic PHP function. It is not CodeIgniter's function.
CodeIgniter is build on PHP, so you can use PHP functions, and you should know PHP. Also, you can improve the user guide. Because CodeIgniter is made by contributions. https://codeigniter4.github.io/CodeIgnit...quest.html You can see "Edit this page" in right of the top. |
Welcome Guest, Not a member yet? Register Sign In |