无法使用Jquery Boxy和Code igniter打开静态html文件内容

我使用的是代码点火器1.7.3,我的静态html文件位于“businesscaliber system application views”文件夹下。我也在使用Jquery Boxy插件。但是当我点击远程内容链接时,它不会显示partial.html内容。
<a href='/partial.html' class='boxy' title='AJAX Content Demo'>Remote content (partial.html)</a>

<script type='text/javascript'>
$(function() {
  $('.boxy').boxy();
});
</script>
    
已邀请:
确保您的partial.html文件位于根目录中,如果您使用.htaccess重写URL,请尝试以下操作:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
    
为此,您需要在根目录中有一个静态html文件 前 根 -system [DIR] - 应用[DIR] -staticHtmlDir [DIR] --partial.html [文件] 你的网址应该如下;
<a href='staticHtmlDir/partial.html' class='boxy' title='AJAX Content Demo'>Remote content (partial.html)</a>
或者你可以这样 控制器文件
<?php
class MyClass extends Controller {

public function MyClass() {

parent::Controller();
}

public function showRemoteHtml() {

$this->load->view('partial');
}

}

/* End of file Myclass.php */
你的网址应该如下;
<a href="<?php echo site_url('Myclass/showRemoteHtml'); ?>" class='boxy' title='AJAX Content Demo'>Remote content (partial.html)</a>
    

要回复问题请先登录注册