[thelist] Use PHP for content?

Ray Hill lists at prydain.com
Thu Nov 21 16:19:00 CST 2002


If you're even peripherally responsible for this site, you should
immediately have them change their index.html page to index.php.  Since it's
not a PHP file, the PHP code in that file is not being executed, and is
leaving the include path to the config file wide open for all to see.  And
since your database username/password are in that file, that's a wide open
security risk.

As for using PHP or content, there are a couple of reasons this might be
useful.  One is if the data is dynamic by nature, as you already mentioned.
Another if is there are using a web-based tool to allow people to edit the
content in a database, and generate the site from that.

The reason that I use PHP even with static content is site design.  This
site doesn't have much in he way of look & feel elements, but if you're
including a header and footer file into every page, it makes it incredibly
easy to change the look and feel of a site at will.

An example of this is the "printable version" link I use on my site
(example: http://www.prydain.com/resume/).  All it does is change the $mode
variable of the current page, so it includes a different header/footer
file - this one without all of the navigational elements, and ready for
printing.  If you wanted to do this with static pages, it you would have to
make a duplicate of the content for each look-and-feel you wanted to
maintain.

--ray





-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of djinn at darkdesigns.org
Sent: Thursday, November 21, 2002 1:28 PM
To: thelist at lists.evolt.org
Subject: [thelist] Use PHP for content?


Thank you for your descriptions and websites. Now that I have read the "What
is PHP" and "What is it good for?" as well as your responses, I have a
specific question. A website that I am only peripherally responsible for
seems to be calling all of it's text using PHP (could be wrong)
http://www.camst.net/. The text isn't contextual or contantly changing or
anything else that I could see using script for. The page also takes *ages*
to load (when I first loaded it I thought there was going to be one heck of
an image file or something).

First, is it common/good practice to use PHP this way?

Second, could this use of PHP be why the page takes so long to load?

Thanks.
Jean Peterson



--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !






More information about the thelist mailing list