I am using thesis theme on my wordpress blog. I am hosting my blog at byethost which has allow_url_fopen=Off and allow_url_include=Off
In one of the function, code is trying to read an image url path. From what I understand, if fopen is ON, it will execute "if" case otherwise "else" case
if ($thesis_design->image['fopen'])
$image_path = $post_image['url'];
else {
$local_path = explode($_SERVER['SERVER_NAME'], $post_image['url']);
$image_path = $_SERVER['DOCUMENT_ROOT'] . $local_path[1];
}
With this code, it is not able to grab the image if I provide absolute path (i.e. http://brijux.com/images/example.jpg) but it can grab image with relative path (i.e images/example.jpg)
But if I comment out "if" case and use only the "else" case, it can grab image with the absolute path.
So my question is,
- if allow_url_fopen=Off, shouldn't it only execute the "else" part?
- how does it grab image file if I am only providing relative path in the "if" case?