skmd
07-08-2008, 12:51 PM
hi everyone,
i'm new to smarty templates and its really nice, but one thing i need to add.
i need to add this function to eliminate BOM's from templates before start compiling .
function removeBOM($str=""){
if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) {
$str=substr($str, 3);
}
return $str;
}
I suppose it must be somewhere in "fetch()" but I cant figure exactly where to put this function to work properly. can anyone help me with that??
i'm new to smarty templates and its really nice, but one thing i need to add.
i need to add this function to eliminate BOM's from templates before start compiling .
function removeBOM($str=""){
if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) {
$str=substr($str, 3);
}
return $str;
}
I suppose it must be somewhere in "fetch()" but I cant figure exactly where to put this function to work properly. can anyone help me with that??