Heim > Datenbank > MySQL-Tutorial > Hauptteil

XAMPP环境下 安装Symfony2

WBOY
Freigeben: 2016-06-07 15:27:15
Original
1031 Leute haben es durchsucht

一、安装xampp :这里不再详述。不过 需要注意的是 :你的xampp最好要安装在c盘。原因是:Symfony2使用过程中需要用到php命令,而系统默认php命令的路径在c:/xampp/php下。 二、配置php环境: 我的电脑-右键-属性-高级-环境变量-系统变量(第二个框框) 1.新建

一、安装xampp:这里不再详述。不过需要注意的是:你的xampp最好要安装在c盘。原因是:Symfony2使用过程中需要用到php命令,而系统默认php命令的路径在c:/xampp/php下。

二、配置php环境:
我的电脑->右键->属性->高级->环境变量->系统变量(第二个框框)
1.新建:变量名:PHP_HOME , 变量值: c:/XAMPP/php(你的php路径),确定
2.修改:双击path ,在变量值后面加上 ;%PHP_HOME%
确定保存

三、下载Symfony2:
在Symfony2官网上下载Symfony2的zip文件.
将文件解压后放到c:/xampp/htdocs,这个路径也是要按照自己的路径来。

四、配置Symfony2的运行环境:
1、打开php.ini文件,一般会在C:/xampp/php目录下,将下列语句取消注释,或者添加:
extension=php_intl.dll
extension=php_pdo_sqlite.dll
extension=php_sqlite3.dll
重启apache。
注:你有可能会遇到intl.dll不存在的提示,你只需要将以下文件复制到apache的bin目录里面即可:

  • icudt46.dll
  • icuin46.dll
  • icuio46.dll
  • icule46.dll
  • iculx46.dll
  • icutu46.dll
  • icuuc46.dll

2、在浏览器中输入网址http://localhost/Symfony/web/config.php,他会提示你还需要配置哪些东西,可能会有以下三个提示:
(1)安装APC:
在 http://downloads.php.net/pierre/ 或者http://dev.freshsite.pl/php-accelerators/apc.html网站下载正确版本的apc,解压将php_apc.dll放在C:/xampp/php/ext下。
在php.ini添加extension=php_apc.dll。
(2)更改时区:date.timezone = Asia/Shanghai
(3)将short_open_tag设为On
(2)(3)都是更改php.ini。
重启apache。
刷新你http://localhost/Symfony/web/config.php页面,如果没有其他提示你就可以使用你的Symfony2了.

如果安装过程中遇到什么问题,可以直接留言,或者邮件给我pinagby@gmail.com。

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!