function save($gmt, $name, $address, $phone, $remark)
{
$query= "INSERT INTO `user` (`gmt`, `name`, `address`, `phone`, `remark`) VALUES ('$gmt', '$name', '$address', '$phone', '$remark')";
mysql_query($query);
}
Run Code Online (Sandbox Code Playgroud)
这里的地址,电话和备注可以是NULL值.我需要它,以便当我将null参数传递给我的函数时,它在数据库中存储一个空值(NULL).我需要知道这样做的最佳解决方案是什么.
谢谢.
我有一个网址
test.php?x=hello+world&y=%00h%00e%00l%00l%00o
Run Code Online (Sandbox Code Playgroud)
当我把它写到文件
file_put_contents('x.txt', $_GET['x']); // -->hello world
file_put_contents('y.txt', $_GET['y']); // -->\0h\0e\0l\0l\0o
Run Code Online (Sandbox Code Playgroud)
但我需要写它没有编码
file_put_contents('x.txt', ????); // -->hello+world
file_put_contents('y.txt', ????); // -->%00h%00e%00l%00l%00o
Run Code Online (Sandbox Code Playgroud)
我能怎么做?
谢谢