You are here: Re: Possible to Insert One HTML Doc Into Another? « HTML « IT news, forums, messages
Re: Possible to Insert One HTML Doc Into Another?

Posted by Toby Inkster on 10/06/46 11:23

Safalra wrote:

> I'd go with SSI for anything that doesn't require PHP features. I
> believe it is parsed slightly faster because of its simpler syntax (I'm
> sure someone will correct my if I'm wrong). Plus more hosts support SSI
> (with no security issues) than PHP (with some security issues).

I agree with you that it's faster and slightly more secure, but I don't
agree that the OP should stick with SSI.

PHP will give him a lot more flexibility in the future -- a lot more
chance to experiment with new things : searches, login accounts, contact
forms, etc.

mod_php's slow down over SSI is only slight, and unless he's using a
complete dinosaur of a web server, it should barely register a difference.

For what he's talking about doing, security issues don't even come into
it. It's only when you start doing things like this that security becomes
an issue:

<?php
$page = $_GET['page'];
$file = 'content/' . $page . '.php';
include($file);
?>

(and in this case there's an easy fix...

<?php
$page = $_GET['page'];
if (preg_match('/\./',$page))
{
print "SECURITY ALERT!";
exit;
}
$file = 'content/' . $page . '.php';
include($file);
?>

..)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация