<?php
$file = file_get_contents('https://s3.amazonaws.com/cloudplus/us-east-1%3A4eddd3f9-3729-473f-984c-16fddfe5e23f/Contacts/Contacts_1436328498.vcf');
?>
I don't know why is show error like this [function.file-get-contents]: failed to open stream: Invalid argument
Make sure so that you have allow_url_fopen
enabled in your php.ini
file.
To edit your php.ini
file an check if allow_url_fopen
is enabled you could check the output of phpInfo()
to find the location of your php.ini
file and then open this file in a text editor and search for allow_url_fopen
and make sure so this is set to On
.
To find the location of your php.ini
file you could do like this from the terminal:
php -r 'phpInfo();' | grep php.ini
When you have located the file you can edit it using a text editor like nano
for instance:
sudo nano /etc/private/php.ini
After you have modified your configuration file make sure so you restart apache using:
sudo apachectl restart
You may also check if there is any suitable wrappers for https
:
$wrappers = stream_get_wrappers();
echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n";
echo 'https wrapper: ', in_array('https', $wrappers) ? 'yes':'no', "\n";
echo 'wrappers: ', var_dump($wrappers);
If no https
wrapper is enabled and you're running windows you should again edit your php.ini
file and uncomment this line:
;extension=php_openssl.dll
Just like before, you need to restart your server for the changes to take effect.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments