By: RJJesus
Date: 2005-09-27
Time: 16:12
|
accessing a variable from the htmlLike in the first example, I tried to access the variable message, writting [var.message] in the html template. When I try it in the browser, it apears [var.message] written, instead of the content of the variable. Can anyone help me on this? Thank you all.
|
|||
By: Skrol29
Date: 2005-09-27
Time: 16:59
|
Re: accessing a variable from the htmlHello,
Can you provide more details, what is your script ? |
|||
By: RJJesus
Date: 2005-09-27
Time: 17:02
|
Re: accessing a variable from the htmlI´ve done two files, just like the first small example from the manual and I can´t see the content of the variable in the browser.
|
|||
By: Skrol29
Date: 2005-09-27
Time: 22:35
|
Re: accessing a variable from the htmlSorry, I miss clues to help you.
What is the URL you open in the browser ? What is the source of your script ? |
|||
By: RJJesus
Date: 2005-09-28
Time: 09:23
|
Re: accessing a variable from the htmlIn the php file that starts the aplication I have :
include_once('tbs_class.php'); $TBS = new clsTinyButStrong; $TBS->LoadTemplate('template.htm'); when I'm going to show the message, in the php file I have: $message = 'Hello world'; $TBS->Show(); In the template.htm : <html> <body> [var.message] </body> </html> In the browser, when 'Hello world' should appear, it shows [var.message] |
|||
By: Skrol29
Date: 2005-09-28
Time: 10:44
|
Re: accessing a variable from the htmlThis is very strange.
Can you try an echo $message; just before the $TBS->Show(); ? An tell the result. Alos try: $TBS->MergeSpecial('var'); before the Show(); |
|||
By: RJJesus
Date: 2005-09-28
Time: 10:52
|
Re: accessing a variable from the htmlMaking echo($message); shows HelloWorld in the browser.
With the $TBS->MergeSpecial('var'); returns the same result. THanks |
|||
By: Skrol29
Date: 2005-09-28
Time: 11:07
|
Re: accessing a variable from the htmlHi RJJesus,
A French user had such a problem. After a long debugging, we found that the problem came from a Php installation with the extension ZendOptimizer which is not up to date. Related information: http://bugs.php.net/bug.php?id=31150 This has been observed with Php 4.3.10 but it can occur with other versions too. This problem is not related to TBS but to the Php/ZendOptimizer and can affect all Php script. There is a simple test to know if your are under this problem. Just try the following code:
Correct result is :
If you have the problem, it prompts :
|
|||
By: RJJesus
Date: 2005-09-28
Time: 11:13
|
Re: accessing a variable from the htmlAll I had was "good good good "...I'm really banging my head.
Thanks friend |
|||
By: Skrol29
Date: 2005-09-28
Time: 11:20
|
Re: accessing a variable from the htmlOk :(
If you want, I can try a debuging with you but this may take several emails exchanges. |
|||
By: RJJesus
Date: 2005-09-28
Time: 11:22
|
Re: accessing a variable from the htmlI´ve tried the second example from the manual and I've got the same problem...I´ll read some txtbooks and try to find something...if I find what's the problem I'll say something...
Thank you friend |
|||
By: RJJesus
Date: 2005-09-28
Time: 15:20
|
Re: accessing a variable from the htmlI've made it, all the variables had to be declared as public, instead of var, and called as public.varname
|