{"id":724,"date":"2023-05-05T13:39:33","date_gmt":"2023-05-05T04:39:33","guid":{"rendered":"https:\/\/shinke1987.net\/?p=724"},"modified":"2023-05-19T21:45:13","modified_gmt":"2023-05-19T12:45:13","slug":"php-tips","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=724","title":{"rendered":"PHP Tips"},"content":{"rendered":"\n<h2 id=\"toc0\" class=\"wp-block-heading\">\u30b3\u30de\u30f3\u30c9<\/h2>\n\n\n\n<h6 id=\"toc1\" class=\"wp-block-heading\">php-fpm\u306e\u8d77\u52d5<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# systemctl start php-fpm\n<\/pre><\/div>\n\n\n<h6 id=\"toc2\" class=\"wp-block-heading\">php-fpm.conf\u306e\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# php-fpm -t\n<\/pre><\/div>\n\n\n<h6 id=\"toc3\" class=\"wp-block-heading\">PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u78ba\u8a8d<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ php -m\n<\/pre><\/div>\n\n\n<h2 id=\"toc4\" class=\"wp-block-heading\">\u5834\u6240\uff08RockyLinux\uff09<\/h2>\n\n\n\n<h6 id=\"toc5\" class=\"wp-block-heading\">php.ini<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/php.ini\n<\/pre><\/div>\n\n\n<h6 id=\"toc6\" class=\"wp-block-heading\">php-fpm.conf<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/php-fpm.conf\n<\/pre><\/div>\n\n\n<h6 id=\"toc7\" class=\"wp-block-heading\">www.conf<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/php-fpm\/www.conf\n<\/pre><\/div>\n\n\n<h6 id=\"toc8\" class=\"wp-block-heading\">PHP-FPM\u306e\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb<\/h6>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/var\/log\/php-fpm\n<\/pre><\/div>\n\n\n<h2 id=\"toc9\" class=\"wp-block-heading\">php.ini<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><center>\u9805\u76ee<\/center><\/td><td><center>\u8aac\u660e<\/center><\/td><\/tr><tr><td>output_buffering<\/td><td>\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3059\u308b\u3002<br>\u30c7\u30d5\u30a9\u30eb\u30c8\uff1a4096<\/td><\/tr><tr><td>error_reporting<\/td><td>\u30a8\u30e9\u30fc\u306e\u51fa\u529b\u30ec\u30d9\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3002<br>E_ALL \u3092\u6307\u5b9a\u3059\u308b\u3068\u5168\u3066\u306e\u30a8\u30e9\u30fc\u3068\u8b66\u544a\u3092\u51fa\u529b\u3059\u308b\u3002<\/td><\/tr><tr><td>default_charset<\/td><td>\u898f\u5b9a\u306e\u6587\u5b57\u30b3\u30fc\u30c9<br>\u4f8b\uff1a&#8221;UTF-8&#8243;<\/td><\/tr><tr><td>date.timezone<\/td><td>\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u3002<br>\u4f8b\uff1aAsis\/Tokyo<\/td><\/tr><tr><td>display_errors<\/td><td>on\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001PHP\u3067\u51fa\u529b\u3055\u308c\u308bHTML\u306b\u30a8\u30e9\u30fc\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"toc10\" class=\"wp-block-heading\">phpinfo()\u3067\u306e\u9805\u76ee\u306b\u3064\u3044\u3066<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><center>\u9805\u76ee<\/center><\/td><td><center>\u8aac\u660e<\/center><\/td><\/tr><tr><td>Directive<\/td><td>\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u540d\u524d\u3002<\/td><\/tr><tr><td>Local Value<\/td><td>httpd.conf \u3084 .htaccess \u306a\u3069\u3067\u4e0a\u66f8\u304d\u3057\u305f\u73fe\u5728\u5024\u3002<\/td><\/tr><tr><td>Master Value<\/td><td>php.ini\u3067\u8a2d\u5b9a\u3057\u305f\u5024\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"toc11\" class=\"wp-block-heading\">PHP\u3067\u306e\u4e3b\u306a\u5b9a\u7fa9\u6e08\u307f\u5b9a\u6570<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><center>\u5b9a\u6570<\/center><\/td><td><center>\u6982\u8981<\/center><\/td><\/tr><tr><td>__FILE__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u7d76\u5bfe\u30d1\u30b9\u3002<\/td><\/tr><tr><td>__DIR__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3002<\/td><\/tr><tr><td>__LINE__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u884c\u756a\u53f7\u3002<\/td><\/tr><tr><td>__FUNCTION__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u95a2\u6570\u540d\u3002<\/td><\/tr><tr><td>__CLASS__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u30af\u30e9\u30b9\u540d\uff08\u6240\u5c5e\u3059\u308b\u540d\u524d\u7a7a\u9593\u3092\u542b\u3080\uff09<\/td><\/tr><tr><td>__METHOD__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u30e1\u30bd\u30c3\u30c9\u540d\u3002<\/td><\/tr><tr><td>__TRAIT__<\/td><td>\u5b9f\u884c\u4e2d\u306e\u30c8\u30ec\u30a4\u30c8\u540d\uff08\u6240\u5c5e\u3059\u308b\u540d\u524d\u7a7a\u9593\u3092\u542b\u3080\uff09<\/td><\/tr><tr><td>__NAMESPACE__<\/td><td>\u73fe\u5728\u306e\u540d\u524d\u7a7a\u9593\u3002<\/td><\/tr><tr><td>DIRECTORY_SEPARATOR<\/td><td>\u30d5\u30a9\u30eb\u30c0\u306e\u533a\u5207\u308a\u6587\u5b57\uff08Win\u306a\u3089\u300c\\\u300d\uff09<\/td><\/tr><tr><td>PATH_SEPARATOR<\/td><td>\u30d1\u30b9\u306e\u533a\u5207\u308a\u6587\u5b57\uff08Win\u306a\u3089\u300c : \u300d\uff09<\/td><\/tr><tr><td>PHP_VERSION<\/td><td>\u4f7f\u7528\u3057\u3066\u3044\u308bPHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u30b3\u30de\u30f3\u30c9 php-fpm\u306e\u8d77\u52d5 php-fpm.conf\u306e\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046 PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u78ba\u8a8d \u5834\u6240\uff08RockyLinux\uff09 php.ini php-fpm.conf www.conf PHP-F [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[81],"class_list":["post-724","post","type-post","status-publish","format-standard","hentry","category-php","tag-php"],"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=724"}],"version-history":[{"count":4,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/724\/revisions"}],"predecessor-version":[{"id":899,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/724\/revisions\/899"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}