Message: file_get_contents(): https:// wrapper is disabled in the server configuratio |
I am trying below code to get city detail from thirdparty website using one of my controller file
PHP Code: $target_url = "https://ziptasticapi.com/{$zip}"; But I am getting below errors, I already tried allow_url_fopen = On & allow_url_include = On in php.ini file, it getting issue with php7.0 while I am using php 5.6 It works fine. So please let me guide its codeigniter issue or server? I am using same above code in external file than it works fine, but while I am using above code with controller it gives error with php7.0. Quote:Severity: Warning
php.ini
Code: ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I'm not saying it's your problem, but you're not using the context parameter correctly, if that was your intention.
See example #4: http://php.net/manual/en/function.file-get-contents.php (06-09-2018, 09:12 AM)InsiteFX Wrote: php.ini I already on it, but while I am using my code with my controller file of the codeignitter framework than it not works let me know if you have another option, I already tried curl but give me error like undefined curl_init() function. I already on library using php.ini file for curl too.
(06-10-2018, 10:20 PM)mehuljogi Wrote:(06-09-2018, 09:12 AM)InsiteFX Wrote: php.ini You might be editing the wrong php.ini Create a test.php, put phpinfo() in it and then access it. It will tell you many things and one of them will be the location the php.ini file, that's the one you need to edit. Don't forget to restart your server after saving php.ini for it to take effect.
And make sure you delete the test.php file when your finished!
It's also a good idea to do an: PHP Code: ob_start(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |