NGINX ? PHP-FPM? ???? ??? ???? ???? PHP ??? ???? ???? ????. 1. PHP-FPM? ?? ??? ?? ??? ???? ???? ??????. 2. nginx ?? ??? ???? FastCGI ??? ???? ?? ? FastCGI_Pass ??? ???? ??????. 3. ???? ??? ??, ?? ?? ?? ? ???? ?? ?????? ???? ?? ? ??? ??? ??????. 4. Index.php ??, FASTCGI ?? ?? ???, PHP ?? ??? ? SELINUX/APPARMOR ?? ??? ?? ??? ?????? ???? ?? ? ??? ??? ??? ???? ??? ?????????.
NGINX ? PHP-FPM? ?? ? ? ?? ??? ?? ?? ????? ???? PHP ??? ?? ? ? ??????? ????? ????. ?? ???? ??? ????? ???? ??? ? ? 403 ?? PHP ??? ???????. ??? ???? ??? ?? ?? ??? ????.

??? ?? ??? ???? ??? ??????
Nginx? PHP? ???? ??? PHP-FPM? ???? ?? ?? ?? ???????.

Sudo apt ?? PHP-FPM
Centos? ?? ?? ???? yum install php-fpm
?? ??? ?? ? ????. ?? ? ???? ???? ?? ? ?? ???? ???????.
???? ??? PHP CLI ? ????? FPM? ???? Nginx? FASTCGI? ?? PHP ??? ??? ? ??? ????.

PHP ??? ???? ?? Nginx ??? ??????
????? Nginx? .php
??? ???? ???? ??? FastCGI ?? ??? ???? ???????. ?? ?? ?? ?? ?? ??? ????.
?? { 80; server_name example.com; ??/var/www/html; ??? index.php index.html; ?? / { try_files $ uri $ uri/ = 404; } ?? ~ \ .php $ { ? ?? ??/fastcgi-php.conf; fastcgi_pass unix : /run/php/php8.1-fpm.sock; } ?? ~ /\.ht { ?? ?? ?????. } }
??? ???? ? ? ?? ??? ????.
- ??? ? ??? ?? ????? ????
root
; -
fastcgi_pass
? ??? ????? PHP---ppm? ?? ??? ??????? (/etc/php/版本/fpm/pool.d/www.conf
? ?? ? ? ??); - TCP? ???? PHP-FPM? ???? ??
fastcgi_pass 127.0.0.1:9000;
?? ? ??? ??? ??????
??? ???? ?? ???? ?? ??? ?? ???? ?? ? ? ????. ?? ??:
- ? ??? ???? ??? ?????? Nginx ???? ?? ? ????.
- PHP-FPM ?? ?? ??? ???? ????.
- NGINX ?? PHP-FPM? ?? ???? ????? ?? ??? ??? ?? ????.
?? ? ??? ??? ??? ????.
-
/var/log/nginx/error.log
?/var/log/php/php8.1-fpm.log
? ?????? -
systemctl status nginx
?systemctl status php8.1-fpm
???? ??? ??? ??????. - Nginx (????? www-data)?? ???? ???? ? ??? ????? ??? ? ??? ??? ??? ??????.
???? ?? ? ?? ?? ?? ??
- index.php? ???? ???? ???? .
index
??? ??????index.php
; - FASTCGI ?? ??? ??????? : ??
fastcgi-php.conf
? ?? ???? ??? ?? ??? ???? ?? ? ????.fastcgi_params
?? ????? ???? Script_Filename? ????? ?? ? ? ????. - PHP ?? ?? : ?? PHP ??? ??? ???? ?? ??? FPM ??? ???? ??? ??????.
- Selinux ?? Apparmor Intercepts Access : Centos/Rhel? ???? ?? Selinux? ??? ?? ? ??
setsebool -P httpd_can_network_connect=1
? ?? ???? ??? ?? ? ? ????.
????? ??? ???? ??. ?? ??? ???? ???? ? ???? ???? ??? ???? ???? ???? ??? ? ????.
? ??? PHP ?? ?? : NGINX ? PHP-FPM ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2
