这段代码一定有什么问题:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo $title; ?></title>
<?php
echo link_tag('assets/css/jquery.mobile-1.3.2.min.css', 'stylesheet');
echo script_tag('assets/js/jquery-1.10.2.min.js');
echo script_tag('assets/js/jquery.mobile-1.3.2.min.js');
?>
</head>
<body>
<div data-role="page">
<header data-role="header">
<a href="#navigation" data-role="button">Show</a>
<h3><?php echo $title; ?></h3>
<div data-role="controlgroup" data-type="horizontal" class="ui-btn-right">
<a href="#" data-role="button">My Account</a>
<a href="<?php echo site_url();?>login" data-role="button">Logout</a>
</div>
</header>
我将 jquery mobile 用于客户端脚本,将 PHP(codeigniter) 用于服务器端脚本。当我在包含锚点后刷新页面时,页面现在不再显示该页面。
谁能告诉代码有什么问题,或者我只是错过了一些东西。
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Event_management_c extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->helper('html', 'url', 'form');
}
public function index() {
$data['title'] = 'Events';
$data['reply_title'] = 'Reply Message';
$this->load->view('fragments/header', $data);
$this->load->view('fragments/nav', $data);
$this->load->view('events/index', $data);
$this->load->view('fragments/footer', $data);
}
}
?>