Welcome Guest, Not a member yet? Register   Sign In
Message: file_get_contents(): https:// wrapper is disabled in the server configuratio
#1

(This post was last modified: 06-10-2018, 10:18 PM by mehuljogi.)

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}";
$cityInfo file_get_contents($target_urlFILE_USE_INCLUDE_PATH); 


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
Message: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0
Filename: controllers/Quotes.php
Line Number: 283

Backtrace:

File: /home/wprcf/public_html/admin/application/controllers/Quotes.php
Line: 283
Function: file_get_contents

File: /home/wprcf/public_html/admin/index.php
Line: 315
Function: require_once

A PHP Error was encountered
Severity: Warning
Message: file_get_contents(https://ziptasticapi.com/46220): failed to open stream: no suitable wrapper could be found
Filename: controllers/Quotes.php
Line Number: 283

Backtrace:

File: /home/wprcf/public_html/admin/application/controllers/Quotes.php
Line: 283
Function: file_get_contents

File: /home/wprcf/public_html/admin/index.php
Line: 315
Function: require_once
Reply


Messages In This Thread
Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - by mehuljogi - 06-09-2018, 02:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB