Zend framework-PHP source code

Source: Internet
Author: User
Ec (2); today I found myself fooled, depressed, and hellip; & nbsp; when I first looked at the zend framework, it feels like someone tells me the portal file (index. php) must be placed on the website with a base address! Then, I moved all the files in the htdocs folder (I installed the xampp installation package, and it is said that this is the base address directory, come on, please come in with zend. I tried it and succeeded. Oh, I am still a senior in my mind, "script" ec (2); "script"

Today I found myself fooled, depressed ......

When looking at the zend framework at the beginning, it seems that whoever tells me that the entry file (index. php) must be placed on the website with a base address!
Then, I moved all the files in the htdocs folder (I installed the xampp installation package, and it is said that this is the base address directory, let's invite zend. I tried it and succeeded. Oh, I am still happy.

Later I found out that, isn't my computer only capable of having one website? Because all of them start with index. php In this zend? Unhappy, I searched the internet for a round, and I was not enough to search people! I found it, haha,
The basic practice is as follows:
1. Move your website file to the folder you want, such as zend

2. Add a domain name in C: WINDOWSsystem32driversetchosts, such

.......
127.0.0.1 zendhost

In fact, a domain name is resolved locally.

3. Add the following content at the end of the apacheconfhttpd. conf file:
............
NameVirtualHost 127.0.0.1

ServerName zendhost
DocumentRoot D: xampphtdocszend
RewriteEngine On


OK, restart. Enter zendhost in the address bar and press Enter,

This is the last thing we can do, but it's ridiculous that it's now from my colleagues today. Originally, there was no such complexity. In fact, you can put it in any folder and enter it in the address bar, such as 127.0.0.1/zendhost! I then looked at the code again, and I added a sentence in index. php:

$ Controller-> setBaseUrl ('/'); so all requests are forwarded to the root directory!

Ah

<

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.