0

I'm submitting though a form with content like this:

This is a test \ or something

Which ends up coming through POST as

This is a test  or something

Notice the missing backslash. I really need the contents with the backslash maintained. Any help would be awesome.

EDIT:

Basically I'm just writing this out to a file:

<?php

frwite($file, $_POST['content']);

?>

I'm not running stripslashes() against it or any other transformations

It works fine on a server with magic_quotes_gpc enabled, but this application may float between servers that support and some that don't.

Basically I'm looking for a way to make this work regardless of magic_quotes_gpc

4

1 回答 1

2

在您的代码中的某处,您可能正在调用stripslashes()。检查您的代码是否没有此功能以及您可能包含的任何其他库。

于 2012-09-15T16:55:03.977 回答