Editing php.ini to allow_url_open = on;
I have tried placing error_reporting(0) at 0. I have tried ini_set('display_errors', 0) too. I still get a warning in my page. I also tried @fopen and file_get_contents... This is the code:
Code: Select all
<?php
/**
* Image Detect - Do we have images on the CDN v2
**/
$cdnurl="http://www.****-cdn.com/";
$pid=$product_info['sku']; // database variable decalred earlier in page
$oldfile="".$cdnurl."catwalk/movies/".$pid.".flv";
$newfile="".$cdnurl."assets/".$pid."/v/".$pid.".swf";
$combi=0; // out variable
if(@fopen($oldfile,"r")===TRUE){
$combi=1;
} else {
if(@fopen($newfile,"r")===TRUE){
$combi=2;
} else {
$combi=3;
}
}
?>
Warning : file_get_contents(http://www.*-cdn.com/catwalk/movies/564_white.flv): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/www.sitedev.com/web/template.inc.php
These are the warnings... I have searched extensively and tried using ===FALSE and ==FALSE but I cannot hide the warning. I am aware the file does not exist but I just want it to skip, this code works on other servers and other cloud nginx servers that are the same setup.
Appreciate any help, my first question so go easy!