CodeIgniter:在新窗口中加载视图 [英] CodeIgniter: Loading view in new window
问题描述
我编写一个脚本,允许用户在使用CodeIgniter将它们保存到数据库之前预览他们的报表。
Im writing a script that allows users to preview their reports before saving them to the database using CodeIgniter.
使用 $ this- ; load-> view('preview_report',$ data);
标签。
有什么我可以添加到这个字符串
Is there anything i can add to this string to make it load into a new browser window?
推荐答案
如果您有不同的功能(或控制器)来创建和预览报告, http:// localhost / appname / report / create 和 http:// localhost / appname / report / preview ,您可以在调用预览功能时打开新的浏览器窗口,使用
If you have different functions (or controllers) for creating and previewing reports, for example http://localhost/appname/report/create and http://localhost/appname/report/preview, you can open new browser window when calling preview function, using basic stuff like
<a href="http://localhost/appname/report/preview" target="_blank" >PREVIEW REPORT</a>
,您的报告将在新窗口中打开 。如果这是你想要的。
and your report will open in new window. if this is what you want.
这篇关于CodeIgniter:在新窗口中加载视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!