Categories > TinyButStrong general >

Warning: filesize

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: JeffHardy
Date: 2004-11-14
Time: 17:05

Warning: filesize

I'm getting this message when i try to load a template using a url instead of using a local path.
Example:
$tpl->LoadTemplate($basedir.'templates/login_box_form.html');-> error
$tpl->LoadTemplate('templates/login_box_form.html'); -> everything is ok

$basedir hold the url of the site, in this case is http://dev.blabla.com/

Warning: filesize(): Stat failed for http://dev.blabla.com/templates/login_box_form.html (errno=2 - No such file or directory) in /home/central/public_html/dev/includes/tbs_class.php on line 2251
By: Skrol29
Date: 2004-11-15
Time: 00:32

Re: Warning: filesize

Hi JeffHardy,

The manual suggests that Url are allowed to load a template, but it produces an error. I haven't tried but it should work with PHP 5.
The error comes from that TBS check the size of the file before to get its content in order to avoid an error from the Php function fread().

I don't know get if I'll fix this in TBS or if I'll change the manual.
Loading a template from an Url is something very expensive in time.