drrw8672 2013-05-06 05:43
浏览 64

使用codeigniter在iframe中显示php文件

Good day guys, I'm trying to learn codeigniter and I'm having a trouble displaying a php file in an iframe. Here's my code. It returns "404 Page not found"

here's my view:

<iframe class="tabContent" name="myIframe" src="<?php echo site_url('pages/view_about');?     >" marginheight="8" marginwidth="8"></iframe>

then here's my controller:

  function view_about(){

    $this->load->view('pages/about');
}

here's how my folders are arranged

application->views->pages->about.php

application->contollers->pages.php

I would just like to add, the code I pasted above for my view is located in

application->views->templates->footer.php

the iframe is actually a part of my footer thanks

  • 写回答

2条回答 默认 最新

  • dtsfnyay300457 2013-05-06 05:57
    关注

    php ending tag has space between

    try this..

    <iframe class="tabContent" name="myIframe" src="<?php echo site_url('pages/view_about'); ?>" marginheight="8" marginwidth="8"></iframe>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备