Think PHP框架搭建
来源:互联网 发布:古筝软件哪个好 编辑:程序博客网 时间:2024/05/21 20:29
1.Think PHP框架搭建
(1)WampServer下载以及安装
下载完成后直接安装,安装中一直下一步就行。但是你要注意你安装的目录。
(2)WampServer的配置
启动WampServer,修改httpd.conf中的配置,httpd.conf的路径如下图所示。
若出现You don't havepermission to access / on this server.
需要修改一下php的配置文件httpd.conf。
在原有的位置文件中找到配置节,修改成
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow# Deny from all Allow from all #允许所有访问 Satisfy all</Directory>
还有
<Directory"D:/Wamp/www"> # # Possible values for the Options directiveare "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must benamed *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicatedand important. Please see #http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directivesmay be placed in .htaccess files. # It can be "All","None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from thisserver. ## onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1</Directory>
修改成
<Directory"D:/Wamp/www"> # # Possible values for the Options directiveare "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must benamed *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicatedand important. Please see #http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directivesmay be placed in .htaccess files. # It can be "All","None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from thisserver. ## onlineoffline tag - don't remove Order Deny,Allow# Deny from all# Allow from 127.0.0.1 Allow from all</Directory>
然后保存,重启服务,在访问就解决了这个问题。
phpmyadmin的配置如下(路径为wamp/alias/phamyadmin.conf)
(3)搭建ThinkPHP框架
一、下载ThinkPHP
网址:http://www.thinkphp.cn/下载你需要的版本(下载完整版,不要下载核心版)
二、搭建ThinkPHP
在www文件夹中新建一个文件夹(我建的是think),将下载的ThinkPHP中的ThinkPHP拷贝到think文件夹里面。
新建一个.php(index.php),代码如下所示(其中Index文件是运行后生成的)可能有的ThinkPHP版本还需要在第三行下面定义define('RUNTIME_PATH',APP_PATH.'Temp/');//定义编译目录位置。
三、搭建文成结果展示
在浏览器中输入127.0.0.1/think/index.php出现如下内容,同时生成Index文件夹。
控制器文件找到IndexAction.class.php(目录如下图所示),运行输出Hello,World,说明安装成功。
- Think PHP框架搭建
- Think PHP(TP)框架的基本使用 (一)
- Think PHP(TP)框架的基本使用 (二)
- Think PHP(TP)框架的基本使用 (补充)
- Think PHP(TP)框架的基本使用 (三)
- thinkPHP 框架 引导类Think.class.php 分析(一)
- php开发框架搭建
- php开发框架搭建
- 搭建一个php框架
- 搭建自己的PHP框架
- php CI框架搭建(一)
- php CI框架搭建(二)
- php CI框架搭建(三)
- Mac搭建PHP Phalcon框架
- Mac搭建PHP Phalcon框架
- Think PHP CURD
- think php 笔记
- Think PHP 3.2 分页
- linux下杀死进程(kill)的N种方法
- ubuntu 13.10 JD-GUI跑不起来怎么办
- syntax error near unexpected token else
- Linux C++ boost库编译使用
- 云计算和 大数据, ---创业, 技术和资金不是主要, 主要是---赚钱模式
- Think PHP框架搭建
- SVN 配置文件说明
- 柴静——《穹顶之下》的雾霾调查读后感
- 如何删除证书文件
- android开发 sqlite设置本地时间
- 常用的android弹出对话框
- artDialog插件的详细使用
- 中国剩余定理 ( POJ 1006 )
- matlab函数 bsxfun