Reply to Re: Newbie Q: looking for PHP-aware HTML editor

Your name:

Reply:


Posted by Andy Jeffries on 12/09/05 17:21

On Fri, 09 Dec 2005 16:33:41 +0200, Juha Suni wrote:
>> It's a nice idea and works fine for small sites, but the way you phrased
>> it seems like the "header/footer" way is for newbies and more
>> experienced coders use the "?page=blah" mechanism, whereas IMHO I'd say
>> it's exactly reversed.
>
> I'd say this is more personal preference. Both ways can work perfectly
> well.

Both can be workable, but I'd say it's more than a personal preference -
one way is better than the other. It's the same as saying you could print
every line of HTML with echo/print. It's workable, it's personal
preference but when you have large amounts of HTML on the page it's better
(and easier to edit) to have it jump in and out of <?php ?> and <?= ?>
blocks.

I don't know how experienced you are in PHP, but IMHO I am very
experienced and would certainly advise against doing it the "?page=blah"
method. Another reason is it reduces caching (as certain transparent
proxies won't cache the pages) and it may adversely affect search engine
positioning.

> You could do some preprocessing before outputting anything (thus
> allowing redirections)

You could but for a large site it would mean index.php would become
massive (and add a large parsing/loading overhead to every page request).
I have one site I work on which is over 500 PHP files (nearly 20,000
lines of code). You can imagine the index.php file would be massive if
it was handling special requirements for all those pages.

> or you could just use output buffering to allow
> header-redirects anywhere.

At the risk your page won't start displaying until the processing has
finished (not all pages are quick to display and some by their inherent
nature aren't).

Cheers,


--
Andy Jeffries | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

[Back to original 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

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