首先介绍一下 Thinkphp 的目录结构
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| |--ThinkPHP(ThinkPHP目录)
|--Financial(项目目录)
|--Common
|--Conf
|--Lang
|--Lib
|--Public
|--Css
|--Js
|--Images
|--Bootstrap
|--Runtime
|--Tpl
|--Uploads
index.php
favicon.ico
|
目录结构如上:
index.php 的文件配置如下:
1 2 3 4 5 6
| <?php define('APP_NAME',''); define('APP_PATH','/home/davidzhang/local.ubuntu.new.financial.com/'); define('APP_DEBUG',TRUE); require '../ThinkPHP/ThinkPHP.php'; ?>
|
/home/davidzhang/local.ubuntu.new.financial.com/
这个目录是我项目的根目录
ok,之后是这些静态文件在项目中的引用,如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href='__PUBLIC__/bootstrap/css/bootstrap.min.css' type='text/css' rel='stylesheet'/> <link href='__PUBLIC__/css/google-bootstrap.css' type='text/css' rel='stylesheet'/> <script src='__PUBLIC__/bootstrap/js/bootstrap.min.js' type='text/javascript'></script> <title>漫步者-财务管家</title> </head> <body> <div class='container-fluid'> <div class='header'> <p>{$title}</p> </div> <div class='container-fluid'> <div class='row-fluid'> <div class='span12'> <p>详细的内容展示</p> </div> </div> </div> <div class='footer'> @Copyright2013 漫步者-财务管家 </div> </div> </body> </html>
|
欢迎指正。