I am new here and have the below problem not getting the filesize.
I have the same problem with mimetype.
Anyone who can help solve my problem or explain why this happens?
RUNNING:
OS: Linux 2.6.37.1-1.2-desktop x86_64
SYSTEM: openSUSE 11.4 (x86_64)
PHP Ver: 5.3.5-5.12.1
/*
1 line in filesizetestfil.txt
public://files/image/2ferie10.png
*/
$inputlines = file('filesizetestfil.txt');
foreach ($inputlines as $line_num => $line) {
$fieldimage_dir = $line;
}
echo "fieldimage_dir = ".$fieldimage_dir."<br /><br />";
// this do not work
$fullpath1 = substr_replace($fieldimage_dir,'',0,9);
echo "fullpath1 = ".$fullpath1."<br />";
$filesize1 = filesize ($fullpath1);
echo "filesize1 = ".$filesize1."<br /><br />";
// this works echo "<img src='".$fullpath1."'><br />";
// this work
$fullpath2 = "files/image/2ferie10.png";
echo "fullpath2 = ".$fullpath2."<br />";
$filesize2 = filesize($fullpath2);
echo "filesize2 = ".$filesize2."<br />";
//this works echo "<img src='".$fullpath2."'><br />";