Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/246.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.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
Php 代码点火器弹出窗口_Php_Jquery_Codeigniter_Popup - Fatal编程技术网

Php 代码点火器弹出窗口

Php 代码点火器弹出窗口,php,jquery,codeigniter,popup,Php,Jquery,Codeigniter,Popup,查看页面中的代码 href=“#”class=“popup”>车辆详细信息 弹出窗口的js文件 (http://preview.hertzci.com/js/core.js) var popups=function(){ } 我必须在弹出窗口中查看“popupVehicle.php”的内容 我该怎么做?一种可能的方法: $content = array(); $content['popup_content'] = $this->load->view('popupVehicle',ar

查看页面中的代码

href=“#”class=“popup”>车辆详细信息

弹出窗口的js文件 (http://preview.hertzci.com/js/core.js)

var popups=function(){

}

我必须在弹出窗口中查看“popupVehicle.php”的内容 我该怎么做?

一种可能的方法:

$content = array();
$content['popup_content'] = $this->load->view('popupVehicle',array(), TRUE);
$this->load->view(*your view*, $content);
在控制器文件中(注意
TRUE
,它是方法的关键):

在您的视图文件中:

<script type='text/javascript'>
    /*Place your popup-showing logic here
      you need to show $('#popup') element*/
</script>
<div id='popup'><? echo $popup_content?></div>

/*将显示逻辑的弹出窗口放在此处
您需要显示$('#popup')元素*/
这背后的想法是将视图的内容加载到一个变量中,将该变量传递给其他视图,并在弹出元素中显示它

<script type='text/javascript'>
    /*Place your popup-showing logic here
      you need to show $('#popup') element*/
</script>
<div id='popup'><? echo $popup_content?></div>