Use Linux-based PHP to build your own wiki website_PHP tutorial
|
||
In the Web 2.0 revolution, the origin of wikis is earlier than blogs. A blog must be written and maintained by yourself. Updating the blog every day will drain your mind. However, wiki technology and the web pages that support it allow everyone to work together to exchange common interests. The wiki is fully open to everyone, including those who browse the wiki pages. In other words, everyone can create, modify and delete page content on the website at will. Compared with blogs, wikis are more team spirit. Usually we translate Wiki as "wiki". The word Wiki comes from the Hawaiian word "wee kee wee kee", which originally means "hurry up". Wiki is an online multi-person collaboration hypertext system writing tool. Wiki sites support community-oriented collaborative writing, where everyone can express their own opinions or expand on jointly maintained topics. Wiki also includes a set of auxiliary tools to support this kind of writing, which can create, change and publish the text of Wiki pages on the basis of the Web, which is much simpler and more convenient than making and updating web pages. There are two ways to implement Wiki: one is to register on the website provided by the Wiki space. After registration, you can start. Another option is to set up a Wiki on your own computer. The advantage is that there is no storage space limit. The disadvantage is that the whole process is a little more troublesome, and you must have good upload bandwidth. However, when the number of visitors is not large, home ADSL is enough. Used. Although there are disadvantages in setting up a Wiki on your own computer, the degree of freedom is relatively large. Here, the author will teach you how to set up a Wiki on your computer in ten minutes. The LAMP dynamic Wiki website to be built in this article is an implementation method based on Linux PHP technology. LAMP (Linux + Apache + MySQL + PHP) has developed rapidly in recent years and has become the de facto standard for Web servers. Although these components were not originally designed to be used together, these open source software are readily available and free to use. This results in these components being often used together. Over the past few years, the compatibility of these components has continued to improve, and their use together has become very common. PHP is a cross-platform server-side embedded scripting language. It draws heavily on the syntax of C, Java and Perl languages, and adds PHP's own features to enable Web developers to quickly write dynamic pages. PHP supports all major databases. It's completely free and you don't need to pay anything to use it. In addition, if you want to use the zlib format on Unix, BSD, and Linux platforms, you need to install the dynamic link function library zlib. The official website of Zlib is: http://www.gzip.org/zlib/. When compiling, please use the following command line options: ./configure --with-zlib. CMS software selection If you search the Web for open source content management, you will find a large number of sites, systems, and projects. In particular, the Open Source Content Management OSCOM site is dedicated to this topic. So what is a content management system? This definition from X-infoModeL is one of the best I’ve seen: “The processes and workflows involved in organizing, classifying, and structuring information resources so that they can be stored, published, and reused in a variety of ways. Content Management The system (CMS) is used to collect, manage and publish content, store content in the form of components or complete documents, while maintaining links between components. It can also provide content correction control "Mambo, which means Mambo Music in Chinese (source). (Cuban black music), is one of the most powerful open source content management systems. At the Linux Users and Developers Conference held in London on April 20, 2004, Mambo stood out from many outstanding open source systems and won the 2004 Best Linux Open Source System Award. It competed with KDE and Firebird. SQL and eGroupware, etc. Mambo's slogan is Power in Simplicity (power comes from simplicity). Mambo is developed based on php+mysql technology and has the characteristics of easy installation, simple management, and high reliability. Mambo can build various types of websites around the world, from simple personal websites to complex corporate application websites, Mambo can easily handle them. Mambo is a content management system for publishing websites. Many modules have been added to provide functions including shopping carts, banner ads, custom maps, chat and forums. Build a Wiki website 1. Mambo CMS software download #cd var/www/html #wegt http://mamboforge.net/frs/download.php/4211/mambo452-Global.zip #unzip mambo452-Global.zip “Create a directory” 2. Mambo creates database # mysql -u root -p Enter password: xxxxxxxxx Your Mysql connection id is 3 to server version: 4.11 Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer. Mysql> create mambo database ; "To create a database" Query OK, 1 row affected (0.01 sec) Mysql>grant all mambo privileges on mambo.* to mambo@localhost identified by ‘76543981’;?“Grant the created Mambo privileges to the Mambo account and set a password” mysql>exit 3. Test whether the newly created database and account can be used # mysql -u -p Enter password: xxxxxxxxx Your Mysql connection id is 3 to server version: 4.11 …… Mysql> connect mambo; Connection id: 5 Current database: mysql>show databases; +-------------+ | Database | +-------------+ | mysql | | mambo | +-------------+ 2 rows in set (0.00 sec) mysql> quit 4. Start installing Mambo ● Grant permissions #cd /var/www/html/ #Enter the actual directory of the Apache server# #chmod 777 /var/www/html/mambo Network installation is very simple and usually requires the following steps: Open the Firefox browser on Linux and enter directly in the address bar: http://hostname/mambo /installation/index.php, and then the following will appear: In the pre-installation preparation interface, select the language option in green, select Agree, and then click the "Next" button, as shown in Figure 1. Then whether to accept the software license agreement, select Agree, and click the "Next" button. ![]() Figure 1 Inspection before installation ● MySQL database settings It should be noted that the MySQL server name is localhost. This is the MySQL server name, not the Linux server name. Usually the MySQL server name is: localhost. The name of the MySQL database is mambo, the MySQL account is mambo and the password is the value set above. The prefix of the database table is usually mom_s, see Figure 2 |

PHP remains a powerful and widely used tool in modern programming, especially in the field of web development. 1) PHP is easy to use and seamlessly integrated with databases, and is the first choice for many developers. 2) It supports dynamic content generation and object-oriented programming, suitable for quickly creating and maintaining websites. 3) PHP's performance can be improved by caching and optimizing database queries, and its extensive community and rich ecosystem make it still important in today's technology stack.

In PHP, weak references are implemented through the WeakReference class and will not prevent the garbage collector from reclaiming objects. Weak references are suitable for scenarios such as caching systems and event listeners. It should be noted that it cannot guarantee the survival of objects and that garbage collection may be delayed.

The \_\_invoke method allows objects to be called like functions. 1. Define the \_\_invoke method so that the object can be called. 2. When using the $obj(...) syntax, PHP will execute the \_\_invoke method. 3. Suitable for scenarios such as logging and calculator, improving code flexibility and readability.

Fibers was introduced in PHP8.1, improving concurrent processing capabilities. 1) Fibers is a lightweight concurrency model similar to coroutines. 2) They allow developers to manually control the execution flow of tasks and are suitable for handling I/O-intensive tasks. 3) Using Fibers can write more efficient and responsive code.

The PHP community provides rich resources and support to help developers grow. 1) Resources include official documentation, tutorials, blogs and open source projects such as Laravel and Symfony. 2) Support can be obtained through StackOverflow, Reddit and Slack channels. 3) Development trends can be learned by following RFC. 4) Integration into the community can be achieved through active participation, contribution to code and learning sharing.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP is not dying, but constantly adapting and evolving. 1) PHP has undergone multiple version iterations since 1994 to adapt to new technology trends. 2) It is currently widely used in e-commerce, content management systems and other fields. 3) PHP8 introduces JIT compiler and other functions to improve performance and modernization. 4) Use OPcache and follow PSR-12 standards to optimize performance and code quality.

The future of PHP will be achieved by adapting to new technology trends and introducing innovative features: 1) Adapting to cloud computing, containerization and microservice architectures, supporting Docker and Kubernetes; 2) introducing JIT compilers and enumeration types to improve performance and data processing efficiency; 3) Continuously optimize performance and promote best practices.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version
Chinese version, very easy to use