|
php-fpm: относительный путь в include
|
|||
---|---|---|---|
#18+
В конфигурационном файле php-fpm с помощью директивы include можно подключать другие файлы: Код: php 1.
Задача заключается в указании относительного пути вместо " /etc/php/8.0/fpm/pool.d " - чтобы при каждом обновлении php не приходилось менять версию в этом пути. тест относительных путейinclude = /pool1.conf WARNING: Nothing matches the include pattern '/pool1.conf' from /etc/php/8.0/fpm/pool.d/pool2.conf at line 7. include = ./pool1.conf WARNING: Nothing matches the include pattern '/usr/./pool1.conf' from /etc/php/8.0/fpm/pool.d/pool-pool2.conf at line 7. include = ../pool.d/pool1.conf WARNING: Nothing matches the include pattern '/usr/../pool.d/pool1.conf' from /etc/php/8.0/fpm/pool.d/pool2.conf at line 7.Задача заключается в указании относительного пути подключаемого файла (относительно директории текущего файла, а не директории установки php, равной /usr ): В стандартном файле настроек php-fpm.conf в комментариях написано: автор;;;;;;;;;;;;;;;;;;;;; ; FPM Configuration ; ;;;;;;;;;;;;;;;;;;;;; All relative paths in this configuration file are relative to PHP's install prefix ( /usr ). This prefix can be dynamically changed by using the '-p' argument from the command line. Include one or more files. If glob(3) exists, it is used to include a bunch of files from a glob(3) pattern. This directive can be used verywhere in the file. Relative path can also be used. They will be prefixed by: - the global prefix if it's been set (-p argument) - /usr otherwise include=/etc/php/8.0/fpm/pool.d/*.confТ.е. по умолчанию относительные пути отсчитываются не от директории текущего файла, а от директории установки PHP ( /usr ). Тогда можно ли решить сабжевую задачу ? ... |
|||
:
Нравится:
Не нравится:
|
|||
16.12.2020, 01:43 |
|
|
start [/forum/topic.php?fid=23&msg=40028185&tid=1459549]: |
0ms |
get settings: |
9ms |
get forum list: |
11ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
38ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
45ms |
get tp. blocked users: |
1ms |
others: | 278ms |
total: | 404ms |
0 / 0 |