0

如何在 codeigniter 中使用重定向控制器文件javascript?在这种情况下,我想在弹出窗口中打开一个文件。

这是我的代码:

<script>
window.open(
    '<?php echo $this->config->base_url()."contorllers/welcome_pop"?>',
    '', 
    'width=700, height=100, toolbar=0, menubar=0, location=0, 
     status=1, scrollbars=no, resizable=no, left=200, top=200');
</script>

文件名是:

controllers/welcome_pop.php

谢谢。

4

1 回答 1

0

你为什么不尝试只调用 url 呢?

<script>
window.open(
'/index.php/controller/<function>',
'', 
'width=700, height=100, toolbar=0, menubar=0, location=0, 
 status=1, scrollbars=no, resizable=no, left=200, top=200');
</script>

这是加载welcome_pop 视图的函数(可能是索引)

于 2013-01-23T09:25:04.323 回答