Hi!
I have installed apache2 on my ubuntu 10.04 LTS and running virtual host. I use SMARTY template`s engine to generate view by php code and my browser don`t show me changes, for instance I wrote some lines of code and saved changes, next refreshed browser and saw old version of page. I can check changes only in terminal by running php [file_name].php command. Please help me because when I use GET arrays I can`t check it in terminal also.
17 replies to this topic
#1
Posted 05 January 2011 - 05:01 PM
|
|
|
#3
Posted 06 January 2011 - 03:03 AM
have you turned off Smarty cache so it generates it's prebuilt files again?
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#4
Posted 06 January 2011 - 08:27 AM
My SMARTY has turned off cache but I have modified Smarty.class.php which is main file of this SMARTY engine. I have just changed one method: __construct called Smarty, because I need it to create my Template class which extends Smarty (in __construct of my class I init $this->Smarty , which is __construct of Smarty.class.php).
#5
Posted 06 January 2011 - 08:29 AM
I think when I will send it to my ftp account all will be working :) But on my machine SMARTY is not working.
#6
Posted 06 January 2011 - 10:50 AM
huh? why are you doing that?
if you have created your own class which extends Smarty, then you shouldn't edit your Smarty.class.php at all, you do all your changes in your new class! that's how object oriented programming is about. in your own __construct, you just call parent::__construct(); to start all in Smarty as well as your own class. then, you start your class, and smarty is started automatically, as it's extending your own class.
if you have created your own class which extends Smarty, then you shouldn't edit your Smarty.class.php at all, you do all your changes in your new class! that's how object oriented programming is about. in your own __construct, you just call parent::__construct(); to start all in Smarty as well as your own class. then, you start your class, and smarty is started automatically, as it's extending your own class.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#7
Posted 06 January 2011 - 12:46 PM
I did it once and when I started script in terminal my machine shout down or something was wrong... But I try it again
#8
Posted 06 January 2011 - 05:57 PM
#9
Posted 06 January 2011 - 11:55 PM
I know only Smary engine. Is orjan any good template engine? Maybe I will learn it ;p
#10
Posted 07 January 2011 - 11:38 AM
I'm pretty good at Smarty atleast ;-) Use it in almost all my own projects.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#11
Posted 07 January 2011 - 12:02 PM
My Template class look like this:
and apache do not show me changes again and when I`m using Smarty.class.php problem persists. I don`t know what I should to do.
class Template extends Smarty {
public function __construct()
{
parent::__construct();
$this->template_dir = Config::getConfigure('directory.template');
$this->compile_dir = Config::getConfigure('directory.compile');
}
}
and apache do not show me changes again and when I`m using Smarty.class.php problem persists. I don`t know what I should to do.
#12
Posted 08 January 2011 - 01:31 AM
I've never used my template like that ti be honest. I've always just instanciated a smarty object and used that in my code. But what you have to do if you do that way is to create an Template object
to start yor code.
to start yor code.
$tmpl = new Template();
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









