Re: [PHP] PHP include security

2010-04-19 Thread Micky Hulse
Hi Michiel! > One thing to keep in mind is that this one doesn't take eval() vs regular > include execution time into account, in case you were still considering > using it. According to this page, it's many times I was still considering it... I mean, I am still exploring all my options for the s

Re: [PHP] PHP include security

2010-04-19 Thread Michiel Sikma
On 18 April 2010 21:43, Micky Hulse wrote: > On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma > wrote: > > I would prefer to use include() since it runs the code in the same > context, > > .. > > with your data rather than printing it right away. > > Thanks for the reply Michiel, I really app

Re: [PHP] PHP include security

2010-04-18 Thread Micky Hulse
On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma wrote: > I would prefer to use include() since it runs the code in the same context, > .. > with your data rather than printing it right away. Thanks for the reply Michiel, I really appreciate it. :) For some benchmarks on the different types o

Re: [PHP] PHP include security

2010-04-18 Thread Michiel Sikma
On 18 April 2010 02:08, Micky Hulse wrote: > Hi Michiel! Thanks for the help, I really appreciate it. :) > > > It depends. What's exactly do you want to prevent? It doesn't seem like a > > .. > > include, say, additional HTML content, use file_get_contents() instead. > > Very good points. My

Re: [PHP] PHP include security

2010-04-17 Thread Micky Hulse
Hi Michiel! Thanks for the help, I really appreciate it. :) > It depends. What's exactly do you want to prevent? It doesn't seem like a > .. > include, say, additional HTML content, use file_get_contents() instead. Very good points. My goal was to write a plugin that would allow me to include

Re: [PHP] PHP include security

2010-04-17 Thread Michiel Sikma
On 16 April 2010 06:57, Micky Hulse wrote: > Hi, > > -snip- > > The above code snippet is used in a class which would allow developers > (of a specific CMS) to include files without having to put php include > tags on the template view. > > The include path will be using the server root path, and

[PHP] PHP include security

2010-04-16 Thread Micky Hulse
Hi, Code: = ob_start(); switch ($this->command) { case 'include': @include($x); break; default: @readfile($x); } $data = ob_get_contents(); ob_end_clean(); = The above code snippet is used in a class which would al