Page 1 of 1

Changing Htm to PHP

Posted: Thu Sep 08, 2005 12:19 am
by mme
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 :wink:

how :?:

Posted: Thu Sep 08, 2005 12:46 am
by feyd
reload itself each time? reload the page in your browser?

Posted: Thu Sep 08, 2005 12:50 am
by josh
Are you talking about not caching the page? Your web server probably has an option to do that, and yes you can change the extensions if you want to, just rename the files..

Posted: Thu Sep 08, 2005 4:01 am
by mme
Yea so the page reloads each time it is viewed :lol:

Posted: Thu Sep 08, 2005 4:38 am
by anjanesh
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

Posted: Thu Sep 08, 2005 4:38 am
by malcg
Use this code before any output is sent to browser:

Code: Select all

header("cache-control: no-store, no-cache, must-revalidate");
	header("expires: " . gmdate("YmdTHis") . "GMT");
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:

Code: Select all

auto_prepend_file            = Prepend.php
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

Re: Changing Htm to PHP

Posted: Thu Sep 08, 2005 5:05 am
by patrikG
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 :wink:

how :?:
Two things:

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

Posted: Fri Sep 09, 2005 3:58 am
by mme
malcg wrote:Use this code before any output is sent to browser:

Code: Select all

header("cache-control: no-store, no-cache, must-revalidate");
	header("expires: " . gmdate("YmdTHis") . "GMT");
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:

Code: Select all

auto_prepend_file            = Prepend.php
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
Would you please give me an example? :wink:

Posted: Fri Sep 09, 2005 8:08 am
by feyd
you may want to know that sending no-cache will make your site run slower and require you to use more bandwidth allotment far far faster.

Posted: Fri Sep 09, 2005 3:39 pm
by mme
I don't have a bandwitch limit :lol: