Reply to Re: Parsing a php include (which also contains php code) - or "Reparsing" the php file

Your name:

Reply:


Posted by J.O. Aho on 06/20/07 04:40

Steven Borrelli wrote:
> Hello,
>
> I am using the <?php include() ?> statement on my website for
> organizational purposes. However, one of my includes contains some
> PHP code. Is there any way for the server to actually parse the
> include? I've tried this before, and it did not parse the include.
> Rather, it included the file as just plain ASCII.

If the main page is a php file, include will also make the included page to be
parsed by php.


I do suggest you use semicolon after each command, no matter if it's alone
between the php-tags or not.


It's always better to use .php as the file extension on the included files
too, this as .inc normally don't be set in the server to be parsed, which
leads to that if a person gives and url like

http://example.net/footer.inc

they will see the full source, and if you happen to have your database
login/password stored in the file, then they will know how to access it.


If you don't already, it's quite good to run apache web server and avoid iss.

--

//Aho

[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

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