how
Changing Htm to PHP
Moderator: General Moderators
Changing Htm to PHP
Hi my current website is in htm and each time I update it i have to refresh it so i was wondering if there was some way to convert them into php so it will reload itsself each time
how
how
Save your page as php and use header to indicate to reload each time.
Code: Select all
<?php
header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
?>
<html>
.
.
.
</html>Page not Cached
Use this code before any output is sent to browser:
This will force NO CACHING of page in any cache between server and browser
I have a PREPEND file that is output with all .php files automatically, viz:
Amend php.ini to state:
where Prepend.php contains above code
BTW I also out my copyright notice at the bottom of each file with an append
Regards
Malcolm
http://av-managaing-consultants.com
Code: Select all
header("cache-control: no-store, no-cache, must-revalidate");
header("expires: " . gmdate("YmdTHis") . "GMT");I have a PREPEND file that is output with all .php files automatically, viz:
Amend php.ini to state:
Code: Select all
auto_prepend_file = Prepend.phpBTW I also out my copyright notice at the bottom of each file with an append
Regards
Malcolm
http://av-managaing-consultants.com
Re: Changing Htm to PHP
Two things:mme wrote:Hi my current website is in htm and each time I update it i have to refresh it so i was wondering if there was some way to convert them into php so it will reload itsself each time![]()
how
1) Welcome to the forum
2) Know your problem, ask precise questions and you will have precise answers: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Page not Cached
Would you please give me an example?malcg wrote:Use this code before any output is sent to browser:This will force NO CACHING of page in any cache between server and browserCode: Select all
header("cache-control: no-store, no-cache, must-revalidate"); header("expires: " . gmdate("YmdTHis") . "GMT");
I have a PREPEND file that is output with all .php files automatically, viz:
Amend php.ini to state:where Prepend.php contains above codeCode: Select all
auto_prepend_file = Prepend.php
BTW I also out my copyright notice at the bottom of each file with an append
Regards
Malcolm
http://av-managaing-consultants.com