Re: Couple of beginner questions
| From: | Andrew Ballard | Date: | Fri, 09 Jan 2009 17:40:48 +0000 |
| Subject: | Re: Couple of beginner questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285871@lists.php.net to get a copy of this message | ||
On Fri, Jan 9, 2009 at 12:18 PM, Gary <gwpaul@ptd.net> wrote:
> I've done a number of sites in html and am now venturing into php.
>
> Can I create a page in html and insert php code that will work? (for
> example, take an existing page and insert a date command)
Not unless you configure your web server to parse all .html documents
with PHP first.
> Can I create a page with the php extension that contains only contains html
> and no php? If so are there advantages/disadvantages?
Absolutely. The only real disadvantage I know of is the small overhead
from causing PHP to process a file that could otherwise be served
directly. That, and you'll possibly blow the use of client-side
caching of what is essentially static content.
> Can I mix and match file formats (php/html) in a single site?
Again, absolutely.
> Thanks for any input.
You're welcome.
> Gary