 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
surreal5335 Smarty Rookie
Joined: 17 Jul 2012 Posts: 5
|
Posted: Mon Jul 30, 2012 7:50 pm Post subject: Need to see what values are being passed in php |
|
|
I have php logic that I need to see the variable values being passed, not to smarty, just inside the classes and setup php files.
It seems that smarty ignores die(), echo, and print_r()... so I am at a loss as to what I should do to debug my server side code.
Smarty is just telling me my variables assigned to smarty in the template_c folder are undefined. So I am trying to find out at what point my data is getting lost in the code. |
|
| Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7047 Location: Lincoln Nebraska, USA
|
Posted: Mon Jul 30, 2012 9:39 pm Post subject: |
|
|
| A debugger like XDebug or ZendDebugger (and IDE) may be of great help in that area. Then you can step through code and watch variables. Otherwise you can print_r($foo) your variables to the screen when you want to check them? |
|
| Back to top |
|
surreal5335 Smarty Rookie
Joined: 17 Jul 2012 Posts: 5
|
Posted: Mon Jul 30, 2012 9:45 pm Post subject: |
|
|
so the print_r() statement does work in my logic files? I have tried but nothing I attempt to view on the screen from my logic files that doesnt go through smarty assignment doesnt show up.
I also read that smarty is designed to ignore such statements
Are there some side notes I should be aware of in order to make my echo's, print_r() and die() functions work? These are my primary form of debugging with php, that and error_reporting() but that one is working for me thankfully. |
|
| Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7047 Location: Lincoln Nebraska, USA
|
Posted: Mon Jul 30, 2012 10:09 pm Post subject: |
|
|
| before you execute smarty, dump your variables and die right there. it should work, smarty cannot affect anything if you don't use it (?) |
|
| Back to top |
|
cl Smarty Rookie
Joined: 05 Dec 2008 Posts: 12
|
Posted: Wed Aug 08, 2012 8:02 am Post subject: |
|
|
You should debug your PHP script line-by-line.
I suggest free PHP IDE Codelobster PHP Edition for it. |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|