For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > June 2007 > Re: Parsing a php include (which also contains php code) - or "Reparsing" t









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Parsing a php include (which also contains php code) - or "Reparsing" t
Steven Borrelli

2007-06-23, 3:58 am

On Jun 22, 10:18 am, "J.O. Aho" <u...@example.net> wrote:
> Steven Borrelli wrote:
>
> The web server won't load the included files, it won't have a clue what has
> been included, as this is handled by the PHP parser module.
>
>
> The extension has nothing to do with if the file will be parsed or not, but of
> "security" reasons it's vise to set the php extension to the include files too.
>
> When you include a php script, see to that the PHP code in that file has the
> '<?PHP' and '?>' tags, or else the php code will be treated as plain text.
>
> example:
>
> --- file1.inc.php ---
> <?PHP
> echo "Hello";
> ?>
> --- eof ---
>
> --- file2.inc.php ---
> echo "Hello";
> --- eof ---
>
> --- index.php ---
> <html><head><title>php include test</title></head><body>
> First include: <?PHP include 'file1.inc.php'; ?><br>
> Second include: <?PHP include 'file2.inc.php'; ?><br>
> </body></html>
> --- eof ---
>
> If you run this small example you will notice that the output will look like this:
>
> First include: Hello
> Second include: echo "Hello";
>
>
> Sure you can, there is no problems with that at all and it's justed quite a
> lot on the most big projects you can find (see freshmeat.net).
>
> --
>
> //Aho


That makes sense now. Thanks so much Aho, ... and everyone else too!

Steven

Ansoo

2007-06-29, 7:16 am

Shania Twain and Christina Aguilera Have Fun In Sauna!
http://www.thetubetech.com/PlayMovie?movie=1673286

Angelina Jolie and Alyson Hannigan Hot Lesbian Girls And Their Games!
http://www.thetubetech.com/Player.mpeg?q=1673286

Lindsay Lohan and Britney Spears Licking Pussy Of Busty Blindfold Babe!
http://www.thetubetech.com/WindowsM...mpeg?id=1673286

Pamela Anderson and Angelina Jolie Licking Pussy!
http://www.thetubetech.com/d?watch=1673286

Christina Aguilera and Tara Reid , Petting Slits!
http://www.thetubetech.com/MediaPlayer?id=1673286
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com