0

I use the codeigniter framework, i put a script in the controller to force download an existing text file in some folder. the connection use the protocol HTTPS.when i click to download the text file from the server , an error has been occurred , it's below:

Message: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
Filename: controllers/process.php

when i print "var_dump(stream_get_wrappers());" that gives a result like that:

array(10) {
  [0]=>
  string(3) "php"
  [1]=>
  string(4) "file"
  [2]=>
  string(4) "glob"
  [3]=>
  string(4) "data"
  [4]=>
  string(4) "http"
  [5]=>
  string(3) "ftp"
  [6]=>
  string(13) "compress.zlib"
  [7]=>
  string(14) "compress.bzip2"
  [8]=>
  string(4) "phar"
  [9]=>
  string(3) "zip"
}

so no https wrapper exist in the array.

how proceed to resolve that?

Thank you for any suggestion...

danneth
  • 2,721
  • 1
  • 23
  • 31
  • 2
    A quick serch on THIS website shoud help you: http://stackoverflow.com/search?q=file_get_contents+with+https – Robert Jun 19 '12 at 12:27

2 Answers2

0

Maybe you don't have access for https protocol.

Try this How to get file_get_contents() to work with HTTPS?

Or use curl or sockets

Community
  • 1
  • 1
Vlad
  • 11
  • 2
0

Make sure that php_openssl.dll or php_openssl.so is enabled.

Amit Garg
  • 3,867
  • 1
  • 27
  • 37