Home > Backend Development > PHP Tutorial > Build a PHP learning framework mycake_PHP tutorial

Build a PHP learning framework mycake_PHP tutorial

WBOY
Release: 2016-07-13 17:50:35
Original
856 people have browsed it

The things I will take over immediately require the use of php. Although I have never been exposed to it at all, I can learn it freely. I basically decided to get started with PHP as soon as possible through practice.


After some understanding, I found that PHP is very fast for building websites, and there are many mature open source PHP frameworks on the Internet. I think it might be more efficient to learn PHP in this way. What you see is what you get.


1. Prepare the environment and install basic components such as apache, mysql, php, etc., which have been discussed in the previous article, so I will not repeat them here. Assume we have the basic environment ready.


2. Download cakephp, the official website is http://cakephp.org/.


3. Enter the /var/www/ directory -------- Because the web page directory of apache is in this directory by default. If you change the path yourself, then enter the root directory of your web page

Create a new folder mycake,

Then unzip the downloaded cakephp into mycake. At this point, theoretically, you can already access cakephp through 127.0.0.1/mycake.


4. The next problem is to deal with the various problems prompted on the homepage

4.1 There is a problem that some cannot be rewritten. This is a directory permissions issue

Enter the apache configuration directory, which is /etc/apache2/ by default, enter the sites-enabled/ directory, and modify the configuration,

DocumentRoot /var/www
                                                                                          Options FollowSymLinks
AllowOverride all
                                                                                                                                                                              Options Indexes FollowSymLinks MultiViews
AllowOverride all
                                                  #Order allow,deny
                                        allow from all                                                                                            
Modify the red part to indicate that you have writable permissions.


​​​ 4.2 I continue to find that there is an app/tmp that cannot be written. This should be a problem with the permissions of the directory,

Enter /var/www/mycake/app, chmod -R 777 tmp

Then get it done

4.3 Found a rewrite problem with ulr. This is because apache has not loaded the rewrite module

Enter /etc/apache2/, enter mods-enable,

Then execute ln -s rewrite_load ../mods-available/rewrite.load

The effect is to establish a soft connection, rewrite.load -> ../mods-available//, and then restart apache

 

At this point, you’re done. The final rendering is as follows:

Next, I am going to start an e-commerce business in LCD, IGBT, and HMI



Excerpted from ShiningStarPxx’s column




http://www.bkjia.com/PHPjc/478276.html
www.bkjia.com

truehttp: //www.bkjia.com/PHPjc/478276.htmlTechArticleThe things I will take over immediately require the use of php. Although I have never been exposed to it, I can learn it freely. I basically decided to get started with PHP as soon as possible through practice. ...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template