我运行不成功
$cookie = "masi@gmail.com,777";
$cookie_tripped = trim(",", $_COOKIE['login']);
echo "Cookie: "$cookie_tripped[0];
它给了我
Cookie:
如何在PHP中执行以下命令?
awk -F, '{ print $1 }'
答案 0 :(得分:2)
$cookie = "masi@gmail.com,777";
$cookie_tripped = explode(",", $cookie);
echo "Cookie: " . $cookie_tripped[0];