更多魔术引语问题 [英] More magic quotes questions

查看:71
本文介绍了更多魔术引语问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,


是的,更多的是着名的''我该怎么办magic_quotes''的问题。

无论如何,这里我们去了:


我已经成为一名PHP开发人员已经有一年了,而且由于种种原因,他们已经厌倦了

magic_quotes。所以,在我的应用程序中,我现在只需使用

..htaccess关闭magic_quotes_gpc,然后根据需要从那里逃脱。


我的问题已成为什么为完全可移植的应用程序做的事情。

我正在编写一个基于XML的PHP​​应用程序,它将使用一个

的MySQL后端,按照我的逻辑我通常使用(通过htaccess转动魔法

报价)我可能会遇到一些问题。基本上,这个

应用程序需要能够以非常简单的配置移动到任何主机提供商。


所以我想嗯,好吧,好吧,我会运行''get_magic_quotes_gpc()''检查

并在魔法报价关闭时逃脱。这不应该导致我自己的代码出现问题,因为无论如何我已经关闭了magic_quotes。


问题是''​​get_magic_quotes_gpc() ''函数似乎无法取回

htaccess指令将其关闭,因此总是会报告。

这基本上使我陷入困境检查他们是打开还是关闭,

或只是指望他们为我自己的应用程序并让他们开启(我

无法访问.ini到完全关闭它们。


更糟糕的是,另一方面 - 如果我和我的.htaccess一起去并且总是

就像我一样关掉它们一直在做,如果我们这个应用程序必须将这个应用程序放在一个IIS服务器上,那么关闭它就会回来咬我。

一个选项。根据我的理解,没有办法在

运行时关闭它们。


有关处理此问题的最佳方法的任何想法吗? />

解决方案

Jon写道:

全部,

是的,它更像是着名的我怎么做magic_quotes''的问题。
无论如何,我们走了:

我已经成为一名PHP开发人员已经有一年了,并且已经成长为讨厌<由于众多原因,magic_quotes。所以,在我的应用程序中,我现在只需使用
.htaccess关闭magic_quotes_gpc,然后根据需要从那里进行转义。

然而,我的问题已成为完全便携式应用程序的操作。我正在编写一个基于XML的PHP​​应用程序,它将使用一个MySQL后端,并按照我通常使用的逻辑(通过htaccess关闭魔法报价)我可能会运行陷入一些问题。基本上,这个
应用程序需要能够以非常简单的配置移动到任何托管服务提供商。

所以我想嗯,好吧,我会运行''get_magic_quotes_gpc()''检查
并逃脱魔法引号关闭的地方。这不应该导致我自己的代码出现问题,因为无论如何我已经关闭了magic_quotes。

问题是''​​get_magic_quotes_gpc()''函数看起来似乎没有能够接收关闭它的htaccess指令,因此它总是被报告。
这基本上使我无法检查它们是否开启,
或只是指望它们用于我自己的应用程序并让它们继续使用(我无法访问.ini以完全关闭它们。)

更糟糕的是,另一方面 - 如果我和我的.htaccess一起去,并且总是像我一直那样关闭它们,如果我们将这个应用程序放在一个关闭它的IIS服务器上,这将会回来咬我
一个选项。根据我的理解,没有办法在运行时关闭它们。

有关处理此问题的最佳方法的任何想法吗?




我代码让他们关闭,并寻找让他们转过来的主机公司

off。有成千上万的好人以这种方式运行。


就像我不会与那些打开register_globals的公司一起主持。


一般来说,我需要询问他们是否关闭或开启。如果他们不能告诉我

这么简单的事情,是时候以另一种方式运行了!

-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================




" Jerry Stuckle" < JS ******* @ attglobal.net>在消息中写道

news:b7 ******************** @ comcast.com ...

Jon写道:

全部,

是的,它更像是着名的'我该怎么办magic_quotes''的问题。
无论如何,我们在这里go:

我已经做了大约一年的PHP开发人员,并且由于种种原因而逐渐厌恶
magic_quotes。所以,在我的应用程序中,我现在只需使用.htaccess关闭magic_quotes_gpc,然后根据需要从
那里逃脱。

我的问题已成为FULLY便携式的操作我正在编写一个基于XML的PHP​​应用程序,该应用程序将使用一个MySQL后端,并按照我通常使用的逻辑(通过htaccess关闭魔术报价) )我可能遇到一些问题。基本上,这个
应用程序需要能够以非常简单的配置移动到任何托管服务提供商。

所以我想嗯,好吧,我会运行''get_magic_quotes_gpc()''
检查并逃脱魔法引号关闭的地方。这不应该导致我自己的代码出现问题,因为无论如何我已经关闭了magic_quotes。

问题是''​​get_magic_quotes_gpc()''函数看起来不像能够接收关闭它的htaccess指令,所以它总是被报告。这基本上使我陷入无法检查他们是否打开或关闭,或只是指望他们为我自己的应用程序和
让他们开启(我没有访问.ini到完全关闭它们。

更糟糕的是,另一方面 - 如果我和我的.htaccess一起去并且总是像我一直那样关掉它们,这将会回来如果我们必须把这个应用程序放在一个关闭它的IIS服务器上,那就咬我了
不是一个选择。根据我的理解,在运行时无法关闭它们。

有关处理此问题的最佳方法的任何想法吗?



就像我不和那些与register_globals一起运行的公司一起上门。

一般来说我需要询问他们是否关闭或打开。如果他们不能告诉我
这么简单,那就是时候用另一种方式了!

-
======== ==========
删除x来自我的电子邮件地址
Jerry Stuckle
JDS计算机培训公司
js ***** **@attglobal.net
==================




是的,但如果我正在建立一个零售应用程序,主机上就没有选择



>>问题是''​​get_magic_quotes_gpc()''函数似乎无法拾取

将其关闭的htaccess指令,因此始终会报告。
这基本上使我陷入无法检查他们是否打开或关闭,或者只是指望他们为我自己的应用程序并让他们开启(我无法访问.ini将它们关掉)。


这很难看,但我怀疑它会起作用:在每个表单上包含一个

隐藏变量,其中包含一个将被magic_quotes修改的值。 />
检查值是否已损坏。相应地采取行动。

关于处理此问题的最佳方法的任何想法?


我代码让他们关闭,并寻找让他们关闭的托管公司
。有成千上万的好人以这种方式运行。

就像我不会与开启了register_globals的公司一样。




说到register_globals,当ini_get(''register_globals'')去

成为致命错误?


Gordon L. Burditt


All,

Yes, it''s more of the famous ''what do I do about magic_quotes'' questions.
Anyways, here we go:

I''ve been a PHP developer for about a year now, and have grown to detest
magic_quotes for numerous reasons. So, in my applications now I simply use
..htaccess to turn magic_quotes_gpc off and I escape as needed from there.

My problem however has become what to do for FULLY portable applications.
I''m currently writing an XML-based PHP application that will be using a
MySQL backend, and going by my logic that I normally use (turning magic
quotes off via htaccess) I might run into some problems. Basically, this
application needs to be able to move to ANY hosting provider with very
little configuration.

So I thought "Hmm, ok, well I''ll just run a ''get_magic_quotes_gpc()'' check
and escape where magic quotes are off. This shouldn''t cause a problem with
my own code because I''ve turned magic_quotes off anyways.

Problem is the ''get_magic_quotes_gpc()'' function doesn''t seem able to pickup
the htaccess directive that turns them off, so it is always reported on.
This basically traps me into not being able to check if they''re on or off,
or simply counting on them for my own application and leaving them on (I
have no access to the .ini to turn them off at all).

Worse yet, on the other side - if I go with my .htaccess and just always
turn them off like I have been doing, this will come back to bite me if we
have to put this application on an IIS server where turning them off is not
an option. From what I understand, there''s no way to turn them off at
runtime.

Any ideas on the best way to handle this?

解决方案

Jon wrote:

All,

Yes, it''s more of the famous ''what do I do about magic_quotes'' questions.
Anyways, here we go:

I''ve been a PHP developer for about a year now, and have grown to detest
magic_quotes for numerous reasons. So, in my applications now I simply use
.htaccess to turn magic_quotes_gpc off and I escape as needed from there.

My problem however has become what to do for FULLY portable applications.
I''m currently writing an XML-based PHP application that will be using a
MySQL backend, and going by my logic that I normally use (turning magic
quotes off via htaccess) I might run into some problems. Basically, this
application needs to be able to move to ANY hosting provider with very
little configuration.

So I thought "Hmm, ok, well I''ll just run a ''get_magic_quotes_gpc()'' check
and escape where magic quotes are off. This shouldn''t cause a problem with
my own code because I''ve turned magic_quotes off anyways.

Problem is the ''get_magic_quotes_gpc()'' function doesn''t seem able to pickup
the htaccess directive that turns them off, so it is always reported on.
This basically traps me into not being able to check if they''re on or off,
or simply counting on them for my own application and leaving them on (I
have no access to the .ini to turn them off at all).

Worse yet, on the other side - if I go with my .htaccess and just always
turn them off like I have been doing, this will come back to bite me if we
have to put this application on an IIS server where turning them off is not
an option. From what I understand, there''s no way to turn them off at
runtime.

Any ideas on the best way to handle this?



I code for having them off, and look for hosting companies who have them turned
off. There are thousands of good ones who run that way.

Just like I don''t host with companies who run with register_globals turned on.

Generally I need to ask them if it''s off or on. And if they can''t tell me
something this simple, it''s time to run the other way!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================



"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:b7********************@comcast.com...

Jon wrote:

All,

Yes, it''s more of the famous ''what do I do about magic_quotes'' questions.
Anyways, here we go:

I''ve been a PHP developer for about a year now, and have grown to detest
magic_quotes for numerous reasons. So, in my applications now I simply
use .htaccess to turn magic_quotes_gpc off and I escape as needed from
there.

My problem however has become what to do for FULLY portable applications.
I''m currently writing an XML-based PHP application that will be using a
MySQL backend, and going by my logic that I normally use (turning magic
quotes off via htaccess) I might run into some problems. Basically, this
application needs to be able to move to ANY hosting provider with very
little configuration.

So I thought "Hmm, ok, well I''ll just run a ''get_magic_quotes_gpc()''
check and escape where magic quotes are off. This shouldn''t cause a
problem with my own code because I''ve turned magic_quotes off anyways.

Problem is the ''get_magic_quotes_gpc()'' function doesn''t seem able to
pickup the htaccess directive that turns them off, so it is always
reported on. This basically traps me into not being able to check if
they''re on or off, or simply counting on them for my own application and
leaving them on (I have no access to the .ini to turn them off at all).

Worse yet, on the other side - if I go with my .htaccess and just always
turn them off like I have been doing, this will come back to bite me if
we have to put this application on an IIS server where turning them off
is not an option. From what I understand, there''s no way to turn them off
at runtime.

Any ideas on the best way to handle this?



I code for having them off, and look for hosting companies who have them
turned off. There are thousands of good ones who run that way.

Just like I don''t host with companies who run with register_globals turned
on.

Generally I need to ask them if it''s off or on. And if they can''t tell me
something this simple, it''s time to run the other way!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================



Yeah, but if I''m building a retail application there''s really no choice on
the host.


>> Problem is the ''get_magic_quotes_gpc()'' function doesn''t seem able to pickup

the htaccess directive that turns them off, so it is always reported on.
This basically traps me into not being able to check if they''re on or off,
or simply counting on them for my own application and leaving them on (I
have no access to the .ini to turn them off at all).
This is ugly, but I suspect it will work: include on each form a
hidden variable containing a value that will be mangled by magic_quotes.
Check to see if the value has been mangled. Act accordingly.
Any ideas on the best way to handle this?


I code for having them off, and look for hosting companies who have them turned
off. There are thousands of good ones who run that way.

Just like I don''t host with companies who run with register_globals turned on.



Speaking of register_globals, when is ini_get(''register_globals'') going
to become a fatal error?

Gordon L. Burditt


这篇关于更多魔术引语问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆