You are here: Re: slashes « PHP Programming Language « IT news, forums, messages
Re: slashes

Posted by Erwin Moller on 10/31/06 11:59

James54321 wrote:

> Ok this is a follow up to a very old topic so I thought it qualified a
> new topic the original topic is:
>
http://groups.google.com/group/comp.lang.php/browse_thread/thread/6f5dcbf1f15e235f
> now I have talked to my resseller (a friend of mine) and he told me he
> doesnt have ANY problems with backslahses going wherever any quotes are
> and he told me I could possibly use the "str_replace" function to get
> around this problem so I tried that but of course trying to put a
> backslash in quotes is either VERY complex or impossible so if you know
> how thats great please tell me. But as I say its very odd as he doesnt
> have the same problem that I have, and being my resseller surely he's
> on the same server as me?
>
> James.

Hi,

Backslashes are added for a good reason namely escaping the next character
all great yeah so you need to know where to use them and where not no such
thing as a general solution yeah please use functions like strip_slashes()
and add_slashes() to make the string fit your needs and do not forget to
understand in the first place where the backslahes come from because if you
do not understand the issue chances are that your application is vunarable
to SQL-injection yeah also it is very well possible that your friends
server has another php.ini than you do so his application behaves
differently look for magic_quotes_gpc settings in your php.ini file and
read the part at www.php.net that covers it just type php.ini in the
searchbox and it will take you there.

Next time use a little more punctuation if you make a posting. :-)

Regards,
Erwin Moller

 

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

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