0% found this document useful (0 votes)
30 views5 pages

Create Framework Project zf2 PDF

Uploaded by

coolsinchan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

Create Framework Project zf2 PDF

Uploaded by

coolsinchan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Start a New Zend Framework 2 Project

XAMPP makes it easy to start developing with PHP, and Zend Framework 2 is one of the most popular PHP
development frameworks. This guide walks you through the process of initializing a new Zend Framework 2
project with XAMPP.

This guide assumes that you have already downloaded and installed Git for Windows, and
that the git binary is in your Windows PATH. If you dont have Git for Windows, you can
NOTE
download and install it from here. It also assumes that the new Zend Framework 2
application will be accessible at the URL [Link]

Follow these steps:

1. Download the Zend Framework 2 skeleton application as a ZIP archive from Github.

2. Within your XAMPP installation directory (usually C:\xampp), create a new directory named apps\ (if it
doesnt already exist). Then, within this new apps\ directory, create a directory to hold your Zend
Framework 2 application and its related XAMPP configuration files. In this example, call the directory
myapp\.

3. Extract the contents of the ZIP archive to the myapp\ directory. This will produce a zendframework-
ZendSkeletonApplication-[xx]\ subdirectory in the myapp\ directory. Rename this newly-created
subdirectory to htdocs.

This new htdocs directory will be the main working directory for your Zend Framework 2
NOTE
project.

4. Within the myapp\ directory, create a new conf\ subdirectory.

a. Within the new conf\ subdirectory, use your text editor to create and populate a file named httpd-
[Link] with the following content:

Alias /myapp/ "C:/xampp/apps/myapp/htdocs/public/"


Alias /myapp "C:/xampp/apps/myapp/htdocs/public"
Include "C:/xampp/apps/myapp/conf/[Link]"

b. Within the conf\ subdirectory, also create and populate a file named [Link] with the following

1
content:

<Directory C:/xampp/apps/myapp/htdocs/public>
Options +FollowSymLinks
AllowOverride All
Require all granted
</Directory>

5. Edit the [Link] file in the apache\conf\extra\ subdirectory of your XAMPP installation directory
and add the following line at the end to include the [Link] file created earlier.

Include "C:/xampp/apps/myapp/conf/[Link]"

NOTE Remember to update the above file and directory paths so that theyre valid for your
system.

6. Check that you have a directory structure like this:

7. Restart the Apache server using the XAMPP control panel.

8. Launch a new Windows command shell using the "Shell" button in the XAMPP control panel.

2
9. Within the command shell, change to the myapp\htdocs\ directory and run the following commands to
update Composer (the PHP dependency manager) and install the Zend Framework 2 components.

php [Link] self-update


php [Link] install

Heres an example of what you might see as Composer downloads and installs dependencies.

10. Once Composer is done, you should be able to access the Zend Framework 2 skeleton application by
browsing to [Link] Here is an example of the default welcome page you should see:

3
You can now begin developing your Zend Framework 2 application by modifying the skeleton application code.
For more information, refer to the Zend Framework 2 User Guide.

You might also like