Example Text: This will be stored in the $_POST['x'] variable
This is sentence one.
This is sentence two.
This is sentence three.
如果我运行下面这这个代码将返回的数组只有一个元素mysqli_real_escape_string阻止preg_split工作?
$x= mysqli_real_escape_string($db, $_POST['x']);
$y= preg_split("/(\r\n|\n|\r)/", $x);
但是,如果我运行此代码下面它将正确将它分成所有3个元素。
$x = $_POST['x'];
$y= preg_split("/(\r\n|\n|\r)/", $x);
有没有其他人经历过这种现象?为什么会发生?编码
你为什么不输出的前/后的$ _ POST [ 'X']和ÿ你可能会明白为什么 – 2013-02-17 21:57:53