Home > Backend Development > PHP Tutorial > Pagoda Panel Tutorial: A Simple Guide to PHP Version Switching

Pagoda Panel Tutorial: A Simple Guide to PHP Version Switching

PHPz
Release: 2024-03-05 09:28:02
Original
901 people have browsed it

Pagoda Panel Tutorial: A Simple Guide to PHP Version Switching

Pagoda Panel is a powerful and easy-to-use server management panel that can help users easily manage websites, databases, FTP and other services. In the process of using the Pagoda Panel, sometimes you need to switch the PHP version to adapt to different website needs. This article will provide you with a simple guide for PHP version switching, and provide specific code examples to help readers quickly complete the PHP version switching operation.

First, we need to log in to the Pagoda panel and enter the website settings page. Find the "Website" option in the left navigation bar and click to enter the website list page. Find the website that needs to switch the PHP version, and click the "Settings" button to enter the website's settings page.

Next, we need to find the "Web" tab, and then select the PHP version we need to switch in the "PHP Version" drop-down menu. Pagoda panel supports multiple PHP versions, such as PHP5.6, PHP7.2, PHP7.3, etc., which can be selected according to the needs of the website. After completing the selection, click the "Save" button to save the settings.

Then, we need to restart the website for the new PHP version to take effect. There is a "Restart" button in the upper right corner of the website settings page. Click this button to complete the website restart operation. Wait a moment for the website to restart.

Some specific code examples are provided below for your reference:

  1. Code examples for switching to PHP7.2 version:

    ln -sf /www/server/php/72/bin/php /usr/bin/php 
    ln -sf /www/server/php/72/bin/phpize /usr/bin/phpize 
    ln -sf /www/server/php/72/bin/php-config /usr/bin/php-config 
    ln -sf /www/server/php/72/bin/pear /usr/bin/pear 
    Copy after login
  2. Code example for switching to PHP7.3 version:

    ln -sf /www/server/php/73/bin/php /usr/bin/php 
    ln -sf /www/server/php/73/bin/phpize /usr/bin/phpize 
    ln -sf /www/server/php/73/bin/php-config /usr/bin/php-config 
    ln -sf /www/server/php/73/bin/pear /usr/bin/pear 
    Copy after login

Through the above simple steps and code examples, we can easily complete the PHP version switching operation in the Pagoda panel . I hope this article can be helpful to you and make you more comfortable when using the pagoda panel!

The above is the detailed content of Pagoda Panel Tutorial: A Simple Guide to PHP Version Switching. For more information, please follow other related articles on the PHP Chinese website!

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