How to get your Zend Studio project and site root directory at the same level

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Zendstudio is one of the most powerful PHP development tools. With it we can easily develop and manage the website backstage project. In fact, a lot of people, especially some novices, feel that Zendstudio creates a local project that is not very good or does not know how to create a project on the root of the site, because there are some unexpected problems that can cause some people to give up the idea. This problem, I just started to do PHP website development when also encountered. In fact, some of our customers ' websites are purely PHP dynamic sites, and creating site projects in the root directory is a priority.

Using Zendstudio to create a website on the root of a Web site is really about three very error-prone details. There is such a PHP site, we assume that there is already a site root directory, such as "D:/php/work1", according to the general web site construction process, we set the site's relevant static page has been completed, and then start the program binding. Open the PHP editor--zend Studio 9.0.4, in the upper-left corner of Zendstudio, file--> new--> Local project, click a pop-up window, as shown in the following figure:

  

First key details, project name Item name, location project storage location, content. The content chooses the basic, the version chooses php5.3 (these two steps change according to the actual need); Project location A lot of people will choose to D:\php\work1 or D:\php\work1\ ... Because D:\PHP\WORK1 is the root directory of a Web site. Only the file Web server in this directory can be accessed. This is not nonsense, but you have to build the Zendstudio project in the site of the D:\php\work1 this directory, then you must be here to the site of the project location selected as D:\php, and then fill in the project name WORK1, this must be noted. Otherwise you can't create a project on the site root. As shown above, the red oval position must be noticed.

Click Next to enter the second key detail and I have created a PHP server in advance: http://h, as shown in the following illustration, Zend Studio uses http:/h as the PHP debug server by default, with the project name "Work1" as base Path, is the project every PHP file debugging will add a http://h/work1 this prefix, some attentive friends may immediately see the problem, we are the project built in the root directory, in fact, Work1 folder is in the d:/php below, the site's root directory is D :/php/work1, so the prefix should be changed to http://h, we want to change "/work1/" to "/", note that the actual no quotes. This may also be a Zend studio is not smart enough. As shown in the following illustration:

  

The next step is to select the support build for this PHP project, or click to complete it, if you do not need support such as jquery Library, Zend Framework Library Dojo Library, JS library, etc.

The third key detail, this time the project is supposed to be built, in fact, not yet, the most critical step, we have to fix a parameter. Note that at this point, the properties of the Project menu for the Zend Studio software are grayed out, and we need to open a PHP file in this WORK1 project, which can be used for properties. We randomly open a index.php file and go to click Properties. Then click on the left-hand menu bar, PHP Debug, and the right side appears as shown in the following image:

  

It is seen that the fact that Zend Studio's benchmark URL is still: Http://h/work1, that is, although the steps between us have been configured, here is still to be modified. Change base Path from "/work1/" to "/" and personally think it might be a bug. After the modification is complete, you have successfully created a PHP project on the root of the site. At this point you can directly debug the php file in the root directory of the site. The text ends here.

This article originates from the Speed ERA network: HTTP://WWW.EADOO.COM,A5, reproduced Please indicate the source, thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.