So verwenden Sie Variablen nach der Nginx-Include-Anweisung
迷茫
迷茫 2017-05-16 17:20:46
0
2
630

wie

include $document_root/aaa.txt;

Es wird ein Fehler gemeldet
open() „/etc/nginx/$document_root/aaa.txt“ ist fehlgeschlagen (2: Keine solche Datei oder kein solches Verzeichnis) in /etc/nginx/nginx.conf:xxx

Die Variablen nach dem Einschließen werden nicht analysiert

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

Antworte allen(2)
Peter_Zhu

include的时候还没变量吧,变量是很后面才有的。

PHPzhong

http://nginx.org/en/docs/ngx_core_module.html#include

Syntax: include file | mask;
Default: —
Context: any
Includes another file, or files matching the specified mask, into configuration. Included files should consist of syntactically correct directives and blocks.

Usage example:

include mime.types;
include vhosts/*.conf;
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!