[英]CodeIgniter putting html in flashdata
When i put some big data like html tags and messages, the session fails, i've tried to use the database but i still get the same error 当我放入诸如html标签和消息之类的大数据时,会话失败,我尝试使用数据库,但仍然遇到相同的错误
$this->session->set_flashdata('message', '
<p class="center">Article added successfully</p>
<p class="center"><a href="/admin/item/add">some other message</a></p>
');
how to fix this? 如何解决这个问题?
您应该这样删除标记之间的空白
$this->session->set_flashdata('message', '<p class="center">Article added successfully</p><p class="center"><a href="/admin/item/add">some other message</a></p>');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.