On Thu, Feb 21, 2008 at 8:04 PM, Mário Gamito <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Sorry for such a laim question.
>
>
>
> I have this code:
>
> $host = 'http://' . $_SERVER['HTTP_HOST'];
>
> "foreach($browser as $key => $val){
> echo "" . " ";
> (...) "
>
>
> but it has a bu
> -Original Message-
> From: Mário Gamito [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 21, 2008 11:04 PM
> To: php-general@lists.php.net
> Subject: [PHP] Problem with quotes
>
> Hi,
>
> Sorry for such a laim question.
>
>
>
> I have this
Hi,
Sorry for such a laim question.
I have this code:
$host = 'http://' . $_SERVER['HTTP_HOST'];
"foreach($browser as $key => $val){
echo "" . " ";
(...) "
but it has a bug, I need to add the server domain before the picture, so
I did:
$host = 'http://' . $_SERVER['HTTP
My thought was to use this until I do all changes. Once the changes are
done - turn off magic_quote_gpc in php.ini.
but, agree, redo whole site on separate place (under 'new' or on other
box) is much better solution.
-afan
> On Thu, August 10, 2006 7:54 am, [EMAIL PROTECTED] wrote:
>> This is w
On Thu, August 10, 2006 7:54 am, [EMAIL PROTECTED] wrote:
> This is what I found and started to use: created magic_quotes_off.php
>
> if (get_magic_quotes_gpc())
> {
> function stripslashes_deep($value)
> {
> $value = is_array($value) ?
> array_map('str
good idea!
:)
thanks richard!
-afan
> On Wed, August 9, 2006 9:07 am, [EMAIL PROTECTED] wrote:
>> Have a web site on server where magic quote is turned On. Because of
>> problems with quotes within forms, I was thinking to turn it Off. I
>> wonder
>> how much work I'll have to change code to acc
On Wed, August 9, 2006 9:07 am, [EMAIL PROTECTED] wrote:
> Have a web site on server where magic quote is turned On. Because of
> problems with quotes within forms, I was thinking to turn it Off. I
> wonder
> how much work I'll have to change code to accept new setting? Are we
> talking about major
This is what I found and started to use: created magic_quotes_off.php
if (get_magic_quotes_gpc())
{
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
hm. good idea. actually, it's, at least, the most safe way.
:)
thanks.
-afan
> [EMAIL PROTECTED] wrote:
>> Hi to all.
>>
>> Have a web site on server where magic quote is turned On. Because of
>> problems with quotes within forms, I was thinking to turn it Off. I
>> wonder
>> how much work I'll
In case anyone's interested, here's the function I use in the open source
project LOVD to undo Magic Quoting on all GPC arrays:
function lovd_magicUnquote ($var = '')
{
if (!$var) {
if (count($_GET)) {
lovd_magicUnquote(& $_GET);
}
if (count($_POST)) {
Chris wrote:
Chris wrote:
J R wrote:
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
Then he has to modify
here's an improvement jwith recursion:
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
if(!is_array($var)) {
$var= stripslashes($var);
} else {
array_walk($var, stripMagicQuotes);
}
}
return $var;
}
hth,
john
On 8/10/06, C
Chris wrote:
J R wrote:
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
Then he has to modify all the code
J R wrote:
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
Then he has to modify all the code to call that f
try to use this few lines of code.
function stripMagicQuotes(&$var)
{
if (get_magic_quotes_gpc()) {
$var= stripslashes($var);
}
return $var;
}
this way you don't really have to worry if magic quotes is on or off.
**
On 8/10/06, Chris <[EMAIL PROTECTED]> wrote:
[EMAIL PROTE
[EMAIL PROTECTED] wrote:
Hi to all.
Have a web site on server where magic quote is turned On. Because of
problems with quotes within forms, I was thinking to turn it Off. I wonder
how much work I'll have to change code to accept new setting? Are we
talking about major changes or something that c
Hi to all.
Have a web site on server where magic quote is turned On. Because of
problems with quotes within forms, I was thinking to turn it Off. I wonder
how much work I'll have to change code to accept new setting? Are we
talking about major changes or something that could be done in day or two
17 matches
Mail list logo