Làm cách nào tôi có thể cài đặt phiên bản PHP cụ thể trong Windows?

PHP (từ viết tắt đệ quy của PHP. Bộ tiền xử lý siêu văn bản) là một ngôn ngữ kịch bản mã nguồn mở, có mục đích chung phổ biến, được sử dụng rộng rãi và phù hợp nhất để phát triển các trang web và ứng dụng dựa trên web. Đây là ngôn ngữ kịch bản phía máy chủ có thể được nhúng trong HTML

Hiện tại, có ba phiên bản PHP được hỗ trợ, tôi. e PHP 5. 6, 7. 0 và 8. 0. Ý nghĩa của PHP 5. 3, 5. 4 và 5. 5 người đều đã hết tuổi thọ;

Trong bài viết này, chúng tôi sẽ giải thích cách cài đặt tất cả các phiên bản PHP được hỗ trợ trong Ubuntu và các dẫn xuất của nó với các phần mở rộng PHP được yêu cầu nhiều nhất cho cả máy chủ web Apache và Nginx bằng cách sử dụng Ondřej Surý PPA. Chúng tôi cũng sẽ giải thích cách đặt phiên bản PHP mặc định sẽ được sử dụng trên hệ thống Ubuntu

Lưu ý rằng PHP 7. x là phiên bản ổn định được hỗ trợ trong kho phần mềm Ubuntu, bạn có thể xác nhận điều này bằng cách chạy lệnh apt bên dưới

$ sudo apt show php OR $ sudo apt show php -a

Hiển thị thông tin phiên bản PHP

Package: php Version: 1:7.0+35ubuntu6 Priority: optional Section: php Source: php-defaults (35ubuntu6) Origin: Ubuntu Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0).

Để cài đặt phiên bản PHP mặc định từ kho phần mềm Ubuntu, hãy sử dụng lệnh bên dưới

$ sudo apt install php

Cài đặt PHP (5. 6, 7. x, 8. 0) trên Ubuntu bằng PPA

1. Trước tiên, hãy bắt đầu bằng cách thêm Ondřej Surý PPA để cài đặt các phiên bản PHP khác nhau – PHP 5. 6, PHP7. x và PHP 8. 0 trên hệ thống Ubuntu

$ sudo apt install software-properties-common $ sudo add-apt-repository ppa:ondrej/php [email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). 0[email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). 1[email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). 2[email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). 3[email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). 4[email protected]> Original-Maintainer: Debian PHP Maintainers <[email protected]> Bugs: //bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11.3 kB Depends: php7.0 Supported: 5y Download-Size: 2,832 B APT-Sources: //archive.ubuntu.com/ubuntu xenial/main amd64 Packages Description: server-side, HTML-embedded scripting language (default) PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). 5
Tìm tệp cấu hình PHP

Bạn cũng có thể thích

  1. Cách sử dụng và thực thi mã PHP trong dòng lệnh Linux
  2. 12 cách sử dụng dòng lệnh PHP hữu ích mà mọi người dùng Linux phải biết
  3. Cách ẩn phiên bản PHP trong tiêu đề HTTP

Trong bài viết này, chúng tôi đã hướng dẫn cách cài đặt tất cả các phiên bản PHP được hỗ trợ trong Ubuntu và các dẫn xuất của nó. Nếu bạn có bất kỳ câu hỏi hoặc suy nghĩ nào muốn chia sẻ, hãy làm như vậy thông qua biểu mẫu phản hồi bên dưới

Làm cách nào để cài đặt phiên bản cụ thể của PHP?

Nếu bạn muốn chọn phiên bản cụ thể của PHP trên một trong hai hệ thống, hãy làm theo một trong các bước cài đặt bên dưới. .
Cài đặt PHP với Apache trên Ubuntu. Nếu bạn đang chạy máy chủ web Apache, hãy cài đặt PHP với mô-đun Apache. .
Cài đặt PHP với Nginx trên Ubuntu. Máy chủ Nginx không có xử lý PHP gốc

Cách cài đặt phiên bản PHP 7. 4 trên Windows 10?

Tải xuống PHP 7. 4 từ Trang web chính thức . Trong bước đầu tiên, để cài đặt PHP 7. 4 trên Hệ điều hành Windows 10, hãy mở trình duyệt web yêu thích của bạn và điều hướng trang web chính thức của PHP. Tiếp theo, tải xuống phiên bản 64 bit Non-Thread-Safe của tệp zip Trình cài đặt PHP7 trên hệ thống của bạn.

Làm cách nào để cài đặt phiên bản PHP 8 trên Windows 10?

Trong ảnh này, chúng ta sẽ thực hiện ba bước sau để cài đặt PHP 8 trên windows. .
Bước 1. Lấy các tệp PHP và giải nén chúng
Bước 2. cấu hình php. ban đầu
Bước 3. Thêm PHP vào biến môi trường đường dẫn

Cách cài đặt PHP 7. 3 trên Windows 10?

Lưu tệp đã tải xuống, php-7. 3. 0-Win32-VC15-x64. .
Truy cập trang web chính thức cho PHP tại php. mạng lưới
Nhấp vào liên kết "tải xuống" trong menu trên cùng. Bạn thấy trang tải xuống
Nhấp vào "Tải xuống Windows". Bạn thấy trang PHP For Windows

Chủ đề