Supervisor: PHP ??????? ?? ??? ???? ?? ???
Supervisor? ?? ?? ??, ??? ??? ? ?? ????? ??? ???? PHP ????? ???? ????? ???? ??? ?? ??? ?????. ? ?????? Supervisor ??, PHP ?????? ?? ? ??? ??? ?? ???? ??? ?? ??? ?????.
??? ??
Supervisor? ??? ?? ???? ????? ??? ???? ? ?????.
- ??? ????? ???? ?? ?????.
- ? ?? ????? ?? ?? ??? ??.
- ??? ? ? ????? ??.
??? ???? PHP ????? ?? ?????.
- ??? ??? ?? Laravel ???
- WebSocket ??? ?? ???? ????.
- ?? ??? ??? ??? ?????.
Supervisor ??
???/???:
sudo apt update sudo apt install supervisor
CentOS/RedHat:
sudo yum install epel-release sudo yum install supervisor
?? ? ??? ??? ? ???:
sudo systemctl start supervisord sudo systemctl enable supervisord
??? ??
Supervisor? ?? ??(????? /etc/supervisor/conf.d/
? ??)? ???? ?? ????? ?????.
?? ?? ?:
?? ???? /etc/supervisor/conf.d/my_php_worker.conf
???:
[program:my_php_worker] command=php /path/to/worker.php autostart=true autorestart=true stderr_logfile=/var/log/my_php_worker.err.log stdout_logfile=/var/log/my_php_worker.out.log
--tries=3
??(command
??? ?)? ?? ? ??? ??? 3??? ?????.
?? ??:
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start my_php_worker:*
?? ?? ??
??? ?? ??? ?? ??? ??? ??? ????.
-
command
: ??? ?????. ?:command=php /path/to/worker.php
-
autostart
: Supervisor? ????? ???? ?????. ?:true
(???),false
. ?:autostart=true
-
autorestart
: ?? ? ???? ?? ?????. ?:true
,false
,unexpected
. ?:autorestart=unexpected
-
startsecs
: ????? ??? ??? ???? ?? ?? ???(?)???. ???: 1. ?:startsecs=5
-
startretries
: ?? ? ?? ??? ?? ?????. ???: 3. ?:startretries=5
-
exitcodes
: ???? ???? ???? ?? ?????. ???: 0,2. ?:exitcodes=0,1
-
stopwaitsecs
: ?? ?? ? ??? ??? ???? ??(?)???. ???: 10. ?:stopwaitsecs=20
-
redirect_stderr
: ?? ??? ?? ???? ???????. ?:true
,false
(???). ?:redirect_stderr=true
-
stdout_logfile
/stderr_logfile
: ?? ?? ? ??? ?? ?? ?? ?????. ?:stdout_logfile=/var/log/my_program.out.log
-
stdout_logfile_maxbytes
/stderr_logfile_maxbytes
: ?? ? ?? ?? ?? ?????. ???: 50MB. ?:stdout_logfile_maxbytes=10MB
-
stdout_logfile_backups
/stderr_logfile_backups
: ??? ??? ?? ?? ????. ???: 10. ?:stdout_logfile_backups=3
-
user
: ????? ??? ??? ??????. ?:user=www-data
-
environment
: ?? ??. ?:environment=APP_ENV="production",DB_HOST="localhost"
-
priority
: ?? ??(?? ?? ?? ??) ???: 999. ?:priority=100
-
directory
: ?? ????. ?:directory=/path/to/your/app
-
stopasgroup
: ????? ? ???? ?? ??? ????. ?:true
,false
(???). ?:stopasgroup=true
-
killasgroup
:stopwaitsecs
??? ????? ?? ?? ????? ??? ?????. ?:true
,false
(???). ?:killasgroup=true
PHP ?? ?? ??
-
Laravel ???: ???? ?? ??? ??
queue:work
??? ?????.sudo apt update sudo apt install supervisor
-
??? ??: ?? ??? ??? ???? ??? ?? cron? ?????.
sudo yum install epel-release sudo yum install supervisor
-
?? ?? ????: WebSocket ??? ?? ?? ????? ?????.
sudo systemctl start supervisord sudo systemctl enable supervisord
??? ?? ???
??? ?? ? Supervisor? ????? ?????.
-
??? ??? ???:
sudo systemctl enable supervisord
-
??? ??(??? ??):
sudo systemctl start supervisord
?? ??
- ???? ???? ??? ?????.
-
stdout_logfile_maxbytes
?stdout_logfile_backups
? ???? ?? ??? ?????. -
environment
???? ???? ??? ?????.
??
Supervisor? ????? ????? ???? PHP ????? ???? ?????. ? ???? ??, ?? ? ?? ??????? ?? ???? ??? ???? PHP ????? ????? ???? ?? ??? ?????.
? ??? PHP ???? ?? ??? ???? ?? ?????. ??? ??? 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? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

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

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)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.
