Categories > TinyButStrong general >

What i am missing?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Ed
Date: 2005-05-03
Time: 13:59

What i am missing?

I'm a newbie with TBS,

PHP Side :
// I named this file sampletbs.php
<?php
include_once('includes/tbs_class_php5.php');
$TBS = new clsTinyButStrong();
$TBS->LoadTemplate('template.htm');
$message = 'Hello Kititoy';
$TBS->Show();
?>

HTML Side:

<html>
<body>
[var.message]
</body>
</html>

ERROR : <br /><b>TinyButStrong Error</b> (LoadTemplate Method): Unable to read the file 'template.htm'.<br />

What i am missing? Thanks for your help



By: Ed
Date: 2005-05-03
Time: 16:43

Re: What i am missing?

By the way, i got this error using Zend. In Dreamweaver, its working fine.

Thanks
By: Skrol29
Date: 2005-05-03
Time: 17:17

Re: What i am missing?

It's probably because your "template.htm" file is in a subdirectory.
By: Ed
Date: 2005-05-03
Time: 22:15

Re: What i am missing?

Thanks for the reply. Both my PHP and HTM files are at the same directory.  I used tbs_class.php instead of tbs_class_php5 and put it at the same directory as PHP and HTM files. In Zend, its yeilding the same below debug warning and output.

=============================================
Debug Warning:
C:\Program Files\ApacheServer\Apache2\htdocs\mpi\tbs_class.php line 2364 - fopen(template.htm) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory
=============================================

Debug output:
br /><b>TinyButStrong Error</b> (LoadTemplate Method): Unable to read the file 'template.htm'.<br />
================================================

Appreciate your help. 




By: Skrol29
Date: 2005-05-04
Time: 12:07

Re: What i am missing?

I've tested on my PC and I have no problem when TBS is in a subdirectory.
It's maybe a problem of alias.
You coded
  include_once('includes/tbs_class_php5.php');
while the Php debug warnings talks about
  ...\mpi\tbs_class.php
By: Ed
Date: 2005-05-04
Time: 17:36

Re: What i am missing?

Thanks for the reply. The debug warning is the same wether i used tbs_class or tbs_class_php and the same TBS error "Unable to read the file 'template.htm'"

But i found something, if i try to run it in the browser, for example http://localhost/mpi/sampletbs.php its working. What i dont understand is, why the debug error and run on the browser. Maybe, this is sort of setup problem with Zend. I dont know.

Anyway, i dont want to take much of your time. For now, i will use first Dreamweaver so i can progress my learning curve in TBS.

Appreciate your support..thanks.