tp5.0 學習(一):虛擬環境安裝
阿新 • • 發佈:2017-09-12
安裝php admin cat code logs exe erro ron log
一、文件目錄:
application: 應用目錄,開發文件存放地
extend:擴展
public:入口文件
thinkphp:核心代碼
vendor:第三方類庫
二、域名Apache配置
①C:\windows\system32\drivers\etc\hosts
127.0.0.1 www.xxx..com
②找到apache 的httpd.conf文件
phpstudy 是在phpstudy\Apache\conf\httpd.conf
安裝phpStudy下載,傻瓜式安裝很簡單,一直點擊下一步即可,中途根據個人愛好設置WebPHP目錄,設置在D盤根目錄裏。 2 打開虛擬主機配置D:\phpStudy\Apache\conf下的 httpd.conf文件去掉#Include conf/extra/httpd-vhosts.conf前面的 # 保存即可。在D:\WebPHP目錄下建立mooc文件。 3 打開D:\phpStudy\Apache\conf\extra下的httpd-vhosts.conf文件 刪除該文件中的所有內容,接下來復制以下代碼粘貼即可。 <VirtualHost *:80> ServerAdmin [email protected]-host2.example.com DocumentRoot"D:\WebPHP" ServerName localhost ServerAlias localhost ErrorLog "logs/dummy-host2.example.com-error.log" CustomLog "logs/dummy-host2.example.com-access.log" common </VirtualHost> <VirtualHost *:80> DocumentRoot "D:\WebPHP\mooc" ServerName web.classmath.com </VirtualHost> <Directory "D:\WebPHP\mooc"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> 4 打開C:\Windows\System32\drivers\etc下的hosts文件添加 127.0.0.1 localhost 127.0.0.1 web.classmath.com 至此虛擬主機配置完畢 END 註意事項 先要刪除httpd-vhosts.conf中的全部代碼再進行後續設置 每一次Apache中文件修改之後,運行項目記得重啟Apache phpmyadmin不能使用,說明沒有刪除httpd-vhosts.conf裏面原有的代碼。
最後如果報這個
Parse error: syntax error, unexpected ‘[‘ in D:\phpStudy\WWW\tp5.0\thinkphp\library\think\Loader.php on line 18
那就是php版本過低,要高於5.4版本
tp5.0 學習(一):虛擬環境安裝