Getting error sending attachments mail Warning: filesize ()

Error:

Warning: filesize () [function.filesize]: stat failed for http://website.com/wp-content/uploads/2015/06/ddlg.jpg in / home 4 / moses / public_html / website.com / ipn- page-template.php on line 72

My code is:

$path = 'http://website.com/wp-content/uploads/2015/06/';
    $filename = 'unnamed.jpg';
    $mailto = 'email@domain.com';
    $subject = "Thank you for Than Near";

    $file = $path . $filename;
    $file_size = filesize($file);
+4
source share
1 answer

Filesizeallows you to check the size of deleted items through fopen wrappers if a URL is specified (how you do it), but many of these things are not reliable. Make sure fopen wrappers are included, and you can contact it before trying to use it.

, , , , .

; .

0

All Articles