这是我的查询运行代码:
$sqlm = getPageById();
if ($resultm = $mysqli->prepare($sqlm))
{
$mypageid = 216;
$resultm -> bind_param("i",$mypageid);
$resultm->execute();
$resultm->store_result();
$rowsm = $resultm->num_rows;
}
if($rowsm > 0)
{
$rowm = fetch($resultm);
$pagetitle = $mysqli->real_escape_string($rowm[0]["page_title"]);
$pageContent = $rowm[0]["page_content"];
$pageurlname = $mysqli->real_escape_string($rowm[0]["page_name_url"]);
}
这是我的查询:
function getPageById()
{
$sqlStr = "select * from tbl_pages where page_id = ?";
return $sqlStr;
}
这就是我邮寄的内容:
$mysqli->real_escape_string ($_POST["page_content"]);
这是我的echo
:
$pageContent = $rowm[0]["page_content"];
<?=$pageContent?>
我在回显中遇到问题我从数据库中得到这样的结果:
而不是:stackoverflow ..我得到:stack/r/n//over/r/n/flow 有什么帮助吗?