Nginx uses a lot of CTX-related variables named, in the absence of the exact meaning of the situation, the mood becomes irritable.
The following is the definition of the ngx_module_s struct.
Consult Brother Qiang: CTX can be understood as the abbreviation of the context
struct ngx_module_s {ngx_uint_t ctx_index;//category identification ngx_uint_t Index;//Module counter The following reserved members are not currently using ngx_uint_t spare0; ngx_uint_t Spare1; ngx_uint_t Spare2; ngx_uint_t Spare3; ngx_uint_t version; module version void *ctx; Module context ngx_command_t *commands; The command set supported by the module ngx_uint_t type; Type of module//callback function ngx_int_t (*init_master) (ngx_ log_t *log); Called */ngx_int_t (*init_module) (ngx_cycle_t *cycle) during initialization of the main process; Call ngx_int_t (*init_process) (ngx_cycle_t *cycle) when the module is initialized; Called ngx_int_t (*init_thread) (ngx_cycle_t *cycle) When the worker process is initialized; call void (*exit_thread) at thread initialization (ngx_cycle_t *cycle); called void (*exit_process) when the thread exits (ngx_cycle_t *cycle); call void (*exit_master) (ngx_cycle_t *cycle) When exiting a worker process; When exiting the main process, call//ToUnder reserved members are not used uintptr_t spare_hook0; uintptr_t Spare_hook1; uintptr_t Spare_hook2; uintptr_t Spare_hook3; uintptr_t Spare_hook4; uintptr_t Spare_hook5; uintptr_t Spare_hook6; uintptr_t Spare_hook7; };
The above describes the Nginx what the meaning of the CTX, including what the TX meaning, nginx content, I hope that the PHP tutorial interested in a friend has helped.