stuart-d
3/3/2017 - 12:52 PM

Tests if file get contents is working

Tests if file get contents is working

<?php
ini_set('display_errors', 1);
?>
<p>calling file_get_contents() and setting the return value to $file</p>
<?php
$file = file_get_contents( 'https://res.cloudinary.com/lightspeed-retail/image/upload/c_fill,h_240,w_240/linpvjyia9paai4aqy50.jpg' );
?>
<p>Dumping the contents of the variable named $file</p>
<p style="color:red;"><?php var_dump( $file ); ?></p>
<p>checking the value of the PHP allow_url_fopen setting</p>
<?php $x = ini_get('allow_url_fopen'); ?>
<p style="color:red;">
<?php var_dump( $x ); ?>
</p>