You are here: Re: If isset query_string return 404 « PHP Programming Language « IT news, forums, messages
Re: If isset query_string return 404

Posted by d on 09/27/17 11:37

"Justin Koivisto" <justin@koivi.com> wrote in message
news:veGdnQAlru3PlVDeRVn-gg@onvoy.com...
>d wrote:
>>
>> I turned off a module in our engine, and you are correct - IIS won't set
>> QUERY_STRING unless prompted to. Regardless, it still doesn't merit
>> calling
>> isset, is_array, and count just to check whether a string is empty or
>> not.
>
> It's not a string, it's an array. To each their own on how to check. I
> just like to be complete - it gives less chance of bugs down the road.
> When you've been doing full-time php development for 6 years, then you
> can criticize my merit of how I do things.

The $_SERVER["QUERY_STRING"] is a string. Checking an array constructed
from the contents of a string is pointless - just check the string. If you
want to use a mixture of constructs and functions to determine the
characteristics of an array over just checking whether a string is empty,
then go right ahead.

And, funnily enough, I've been coding PHP professionally "full-time" for 7
years, so it seems I can criticise the merit of how you do things. Thanks
for letting me know ;)

>
> --
> Justin Koivisto, ZCE - justin@koivi.com
> http://koivi.com

 

Navigation:

[Reply to this 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

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