Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use PHP to build a class website

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to use PHP to build a class website, I believe that many inexperienced people are at a loss about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

one。 Current website information architecture II. Website operating environment and technology combination

Note: the left side is the current technology combination, and the right side is the possible combination in the future.

three。 Build the environment and code hosting on Tencent Cloud:

Windows: UPUPW, WAMP or manually install as documented

CentOS7: complete installation documentation written by classmates in our studio

Code hosting: GITHUB project address

four。 Experience sharing

Starting as a freshman, how did I build my website from front to back in less than a year, and why did I choose this technology combination and step on what hole?

Learning and development experience

The use of online platforms, Mutu.com, experimental buildings, geek colleges and many other free learning platforms are good ways to learn.

Know how to use plug-ins, multi-Google, there are many answers to questions on StarOverFlow

The most important thing is to maintain your enthusiasm for programming, programming will take up a lot of your time, if you are not interested, it is difficult to stick to it, do more of what you want to do, often can bring motivation to learn.

……

How to be lazy

Environment configuration section: one-click installation, pay attention to the retention or collection of environment configuration documents, development environment updates to make a backup.

Teamwork: using team collaboration tools such as GITHUB, good version control and workflow will reduce the cost of conflicts, it is important that other people's code does not change:)

Wheels: template / framework-based development can be much faster by making good use of existing open source components rather than building wheels.

Refactoring and wrapper: instead of focusing on writing code, you can try to encapsulate existing services into services and develop without changing the underlying layer:)

Editor section: good editor code completion, keyboard shortcuts can save a lot of time.

Reasons for choosing the current technology portfolio:

Changes in the front end: HTML5 and CSS3 are now more and more widely used, and in order to meet the needs of responsive design this semester, the front end has shifted from the original HTML,CSS,JavaScript to HTML5,CSS3 and jQuery, and has begun to use more plug-ins.

Back-end language and framework choice: in the premise of low performance requirements, php does not need to compile, the cost of learning is relatively low, easy to use, but also for this reason, you need to use a framework to make the project structure and coding specifications clearer, while ThinkPHP as a popular, well-documented domestic PHP framework is my first choice.

The reason why the database chooses MySQL: PHP's good support, phpmyadmin, open source free. Finally, due to the data collection of some campus websites and the query of CET-4 and CET-6 scores, Python was used as a web crawler.

Server selection: Tencent Cloud student server 1 CNY support:), fast access and good stability

Technically stepped on the pit:

1. When we first used the MVC framework, there was no concept of model, and the database operation was written in the controller, so it was troublesome to maintain, reuse and extend it.

two。 The database was originally designed without scalability. Recently, when the database migrated to a high version, it was too lazy to export sql, copied the data directory to a high version of MySQL, and then the data was abnormal. So far, the personal forum has not had time to recover the data.

3. At first, the password design only did simple md5 encryption, so now the character md5 has not been added.

4. One day, I suddenly turned to the previous document and found that the code I wrote had deviated from the original design (software course assignment: student management system) and became the class website:)

After reading the above, have you mastered the method of how to build a class website with PHP? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report