Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 有没有办法将js通知与set_flashdata codeigniter一起使用?_Javascript_Php_Codeigniter - Fatal编程技术网

Javascript 有没有办法将js通知与set_flashdata codeigniter一起使用?

Javascript 有没有办法将js通知与set_flashdata codeigniter一起使用?,javascript,php,codeigniter,Javascript,Php,Codeigniter,使用Codeigniter 3 我是初学者 我已经尝试了越来越多的使用 使用$this->session->set_flashdata('','')但我失败了。当我放置flash数据时,我不知道如何在js中调用show notification方法$this->session->flashdata('messagename')使用这个简单的烤面包机,而不是使用外部烤面包机 Html代码 <div class="toast toast-default"> <button

使用Codeigniter 3

我是初学者

我已经尝试了越来越多的使用
使用
$this->session->set_flashdata('','')
但我失败了。当我放置flash数据时,我不知道如何在js中调用show notification方法
$this->session->flashdata('messagename')

使用这个简单的烤面包机,而不是使用外部烤面包机

Html代码

<div class="toast toast-default">
    <button class="toast-dismiss"><i class="fa fa-times"></i></button>
        Oops!!! Something went wrong while adding this product. Please try again after sometime.
</div>

哎呀!!!添加此产品时出现问题。请稍后再试。
Css

.toast默认值{
背景:rgba(531641780.8)无重复滚动0;
颜色:#fff;
}
.吐司{
边界半径:5px;
显示:无;
.toast-default {
    background: rgba(53, 164, 178, 0.8) none repeat scroll 0 0;
    color: #fff;
}
.toast {
    border-radius: 5px;
    display: none; <--- if flashdata is set make it block.
    padding: 20px 10px 10px;
    position: fixed;
    right: 20px;
    top: 100px;
    width: 250px;
    z-index: 1000;
}