Jump to content

[Apache2]Do not show me changes

- - - - -

  • Please log in to reply
17 replies to this topic

#1
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
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.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Did you clear browser cache before viewing the page again?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
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

#4
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
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
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
I think when I will send it to my ftp account all will be working :) But on my machine SMARTY is not working.

#6
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
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.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#7
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
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
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
  • Location:New York, NY
I hate smarty. ( Orjan, I had to include that for completeness :) )

#9
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
I know only Smary engine. Is orjan any good template engine? Maybe I will learn it ;p

#10
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
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

#11
AdrianWierciochPHP

AdrianWierciochPHP

    Learning Programmer

  • Members
  • PipPipPip
  • 54 posts
My Template class look like this:

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
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
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.

$tmpl = new Template();

__________________________________________
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