Bạn cũng có thể chạy php --ini trong thiết bị đầu cuối để xem tệp nào được PHP sử dụng ở chế độ CLI

Composer đã có tùy chọn

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
7 [chú ý chữ s trong
composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
8], nhưng nó bỏ qua tất cả các yêu cầu nền tảng, bao gồm phiên bản PHP, tiện ích mở rộng [
composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
9] và
composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
0

Tùy chọn

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
1 mới có thể được sử dụng để đặt các yêu cầu cụ thể mà Trình soạn thảo có thể bỏ qua

Bỏ qua nhiều yêu cầu nền tảng

Bạn có thể chỉ định một hoặc nhiều yêu cầu nền tảng để bỏ qua bằng cách sử dụng tùy chọn này nhiều lần

Ví dụ: để bỏ qua phiên bản PHP và

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
2, nhưng thực thi tất cả các yêu cầu nền tảng khác, bạn có thể sử dụng lệnh như thế này

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip

Cài đặt các gói Trình soạn thảo trên các phiên bản PHP chưa được phát hành

Trường hợp sử dụng phổ biến của tùy chọn

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
3 sẽ là kiểm tra các gói PHP trong các phiên bản PHP chưa được phát hành hoặc bản dựng
composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
0 của PHP

Các thư viện như PHPUnit đi kèm với ràng buộc phiên bản PHP khá nghiêm ngặt trong tệp

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
1 của chúng, điều này ngăn chúng cài đặt các thư viện trong các phiên bản
composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
0 của PHP

Thay vì sử dụng

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
3, sẽ bỏ qua tất cả các yêu cầu nền tảng, chẳng hạn như tiện ích mở rộng [có thể cần thiết để gói hoạt động], bạn có thể sử dụng tùy chọn
composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
3 để chỉ định có chọn lọc các yêu cầu nền tảng mà bạn cố ý bỏ qua

Cung cấp bởi. php5-cli_5. 5. 9+dfsg-1ubuntu4_AMD64

TÊN

       php - PHP Command Line Interface 'CLI'

       php-cgi - PHP Common Gateway Interface 'CGI' command

TÓM TẮT

       php [options] [ -f ] file [[--] args...]

       php [options] -r code [[--] args...]

       php [options] [-B begin_code] -R code [-E end_code] [[--] args...]

       php [options] [-B begin_code] -F file [-E end_code] [[--] args...]

       php [options] -- [ args...]

       php [options] -a

       php [options] -S addr:port [-t docroot]

SỰ MIÊU TẢ

       PHP  is a widely-used general-purpose scripting language that is especially suited for Web
       development and can be embedded into HTML. This is the command line interface that enables
       you to do the following:

       You  can parse and execute files by using parameter -f followed by the name of the file to
       be executed.

       Using parameter -r you can directly execute PHP code simply as you would do inside a  .php
       file when using the eval[] function.

       It  is also possible to process the standard input line by line using either the parameter
       -R or -F. In this mode each separate input line causes the code specified  by  -R  or  the
       file  specified  by  -F  to  be  executed.   You can access the input line by $argn. While
       processing the input lines $argi contains the number of the actual line  being  processed.
       Further  more  the  parameters  -B  and -E can be used to execute code [see -r] before and
       after all input lines have been processed respectively. Notice that the input is read from
       STDIN  and  therefore  reading  from STDIN explicitly changes the next input line or skips
       input lines.

       PHP also contains an built-in web server for application development purpose. By using the
       -S  option  where  addr:port  point  to  a  local address and port PHP will listen to HTTP
       requests on that address and port and serve files from the current  working  directory  or
       the docroot passed by the -t option.

       If  none  of  -r -f -B -R -F -E or -S is present but a single parameter is given then this
       parameter is taken as the filename to parse and execute [same as with -f]. If no parameter
       is present then the standard input is read and executed.

TÙY CHỌN

________số 8

CÁC TẬP TIN

       /etc/php5/cli/php.ini
                      The configuration file for the CLI version of PHP.

       /etc/php5/cgi/php.ini
                      The configuration file for the CGI version of PHP.

       /etc/php5/apache2/php.ini
                      The configuration file for the version of PHP that apache2 uses.

VÍ DỤ

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
0

LỜI KHUYÊN

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
1

XEM THÊM

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
2

LỖI

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
3

TÁC GIẢ

composer install --ignore-platform-req=php --ignore-platform-req=ext-zip
4

THÔNG TIN PHIÊN BẢN

       php [options] [ -f ] file [[--] args...]

       php [options] -r code [[--] args...]

       php [options] [-B begin_code] -R code [-E end_code] [[--] args...]

       php [options] [-B begin_code] -F file [-E end_code] [[--] args...]

       php [options] -- [ args...]

       php [options] -a

       php [options] -S addr:port [-t docroot]

0

BẢN QUYỀN

       php [options] [ -f ] file [[--] args...]

       php [options] -r code [[--] args...]

       php [options] [-B begin_code] -R code [-E end_code] [[--] args...]

       php [options] [-B begin_code] -F file [-E end_code] [[--] args...]

       php [options] -- [ args...]

       php [options] -a

       php [options] -S addr:port [-t docroot]

1

Chủ Đề