【发布时间】:2014-11-03 19:03:35
【问题描述】:
如何将“&”符号添加到 URL GET 变量中,使其成为字符串的一部分? 问题是它总是将字符串拆分到下一个变量。
我怎样才能做到这一点?
localhost/test.php?variable='jeans&shirts' // so it executes it like a string
<?php
require "connect.php";
$variable = $_GET['variable'];
echo $variable;
?>
输出是'牛仔裤'
而不是“牛仔裤和衬衫”
【问题讨论】: