Re: [PHP] mysterious include problem

2009-12-10 Thread Kim Madsen
LinuxManMikeC wrote on 2009-12-07 22:48: > Instead of hard coding cases you can validate and constrain the input > with a regex. Much more flexible when adding content. I would also > add code to make sure the file exists, otherwise fall through to the > default. In huge sites with a lot of inc

Re: [PHP] mysterious include problem

2009-12-10 Thread Kim Emax
LinuxManMikeC wrote on 2009-12-07 22:48: Instead of hard coding cases you can validate and constrain the input with a regex. Much more flexible when adding content. I would also add code to make sure the file exists, otherwise fall through to the default. In huge sites with a lot of include f

Re: [PHP] mysterious include problem

2009-12-10 Thread Jochem Maas
Ashley Sheridan schreef: > On Tue, 2009-12-08 at 17:32 +0100, Jochem Maas wrote: > >> Hi Allen, >> >> gonna be a bit ruthless with you :). >> >> 1. your not filtering your input (your open to include being hacked) >> 2. your not validating or error checking (e.g. does the include file exist??) >>

Re: [PHP] mysterious include problem

2009-12-08 Thread Ashley Sheridan
On Tue, 2009-12-08 at 17:32 +0100, Jochem Maas wrote: > Hi Allen, > > gonna be a bit ruthless with you :). > > 1. your not filtering your input (your open to include being hacked) > 2. your not validating or error checking (e.g. does the include file exist??) > 3. keeping large numbers of conten

Re: [PHP] mysterious include problem

2009-12-08 Thread Jochem Maas
Hi Allen, gonna be a bit ruthless with you :). 1. your not filtering your input (your open to include being hacked) 2. your not validating or error checking (e.g. does the include file exist??) 3. keeping large numbers of content pages with numerical filenames is a maintenance nightmare and inci

Re: [PHP] mysterious include problem

2009-12-07 Thread LinuxManMikeC
Instead of hard coding cases you can validate and constrain the input with a regex. Much more flexible when adding content. I would also add code to make sure the file exists, otherwise fall through to the default. On Mon, Dec 7, 2009 at 1:14 PM, Kim Madsen wrote: > Hi Allen > > Allen McCabe wr

Re: [PHP] mysterious include problem

2009-12-07 Thread Ashley Sheridan
On Mon, 2009-12-07 at 21:14 +0100, Kim Madsen wrote: > Hi Allen > > Allen McCabe wrote on 2009-12-07 21:03: > > I have been using includes for my content for a while now with no problems. > > Suddenly it has stopped working, and it may or may not be from some changes > > I made in my code structu

Re: [PHP] mysterious include problem

2009-12-07 Thread Kim Madsen
Hi Allen Allen McCabe wrote on 2009-12-07 21:03: I have been using includes for my content for a while now with no problems. Suddenly it has stopped working, and it may or may not be from some changes I made in my code structure. I use default.php for most or all of my pages within a given dire

[PHP] mysterious include problem

2009-12-07 Thread Allen McCabe
I have been using includes for my content for a while now with no problems. Suddenly it has stopped working, and it may or may not be from some changes I made in my code structure. I use default.php for most or all of my pages within a given directory, changing the content via page numbers in the