#今天遇到一个坑爹的问题,写成单引号就不行,被原样输出了。
/**
*判断key是否存在
*/
function exists_key(
$key){
return $this->cmd('EXISTS $key'
);
}
造成的原因:
” ” 双引号里面的字段会经过编译器解释,然后再当作HTML代码输出。
‘ ‘ 单引号里面的不进行解释,直接输出。
/**
*判断key是否存在
*/
function exists_key(
$key){
return $this->cmd(”EXISTS
$key“);
}
转载于:https://www.cnblogs.com/hgj123/p/4538186.html
转载请注明原文地址: https://mac.8miu.com/read-10210.html