{"id":285923,"date":"2017-05-04T15:15:03","date_gmt":"2017-05-04T11:15:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285923"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285923","title":{"rendered":"SimplePage: \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f"},"content":{"rendered":"<p><strong>\u0425\u043e\u0447\u0443<\/strong> \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0425\u0430\u0431\u0440\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c PHP-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c, \u0432\u044b\u0440\u043e\u0441\u0448\u0438\u043c \u0438\u0437 \u0438\u0434\u0435\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c\u0430 \u0438 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><strong>\u041d\u0435 \u0445\u043e\u0447\u0443<\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0439, \u0432\u043f\u0430\u0440\u0438\u0432\u0430\u044e\u0449\u0438\u043c \u0432\u0430\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430\u0434 \u043a\u0430\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage-example\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u043b\u043e\u0433\u0430<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/issues\">\u0411\u0430\u0433\u0438 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/gitter.im\/simplepage-php\/Lobby\">\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u0441\u0432\u044f\u0437\u044c<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php $sp = [   'layout' =&gt; [     'title' =&gt; '\u0421\u0442\u0430\u0442\u044c\u044f',   ],   'input' =&gt; [     INPUT_GET =&gt; [       'id' =&gt; [         FILTER_SANITIZE_NUMBER_INT,         [           'filter' =&gt; FILTER_VALIDATE_INT,           'options' =&gt; ['min_range' =&gt; 1],           'comment' =&gt; '\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c'         ]       ],     ],   ],   'pdo' =&gt; [     'queries' =&gt; [       'article' =&gt; [         'SELECT * FROM article WHERE id = :id',         'params' =&gt; [           'id' =&gt; &amp;$_GET['id'],         ],       ],     ],   ], ]; include('..\/..\/sp.php'); $article = $article-&gt;fetch(); ?&gt; &lt;h1&gt;     &lt;?= $article-&gt;title ?&gt; &lt;\/h1&gt; &lt;div&gt;     &lt;?= $article-&gt;content ?&gt; &lt;\/div&gt; &lt;ul&gt;     &lt;li&gt;         &lt;a href=&quot;\/articles\/edit?id=&lt;?= $article-&gt;id ?&gt;&quot;&gt;edit&lt;\/a&gt;     &lt;\/li&gt;     &lt;li&gt;         &lt;a href=&quot;\/articles\/delete.php?id=&lt;?= $article-&gt;id ?&gt;&quot;&gt;delete&lt;\/a&gt;     &lt;\/li&gt; &lt;\/ul&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u044d\u043a\u0448\u0435\u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php &lt;?php if($_SERVER['REQUEST_METHOD'] != 'GET'){   http_response_code(404);   exit; } $sp = [   'input' =&gt; [     INPUT_GET =&gt; [       'id' =&gt; [         FILTER_SANITIZE_NUMBER_INT,         [           'filter' =&gt; FILTER_VALIDATE_INT,           'options' =&gt; ['min_range' =&gt; 1],           'comment' =&gt; '\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c'         ]       ],     ],   ],   'pdo' =&gt; [     'queries' =&gt; [       [         'DELETE FROM article WHERE id = :id',         'params' =&gt; [           'id' =&gt; &amp;$_GET['id'],         ],       ]     ],   ], ]; include('..\/sp.php'); header('Location: \/articles', 302);<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f, \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"kratkoe-vvedenie\">\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <a href=\"https:\/\/jekyllrb.com\/\">Jekyll<\/a>, \u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 SimplePage, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0432\u0441\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php $sp = [ \/\/ \u0412\u0432\u043e\u0434\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0430\u0439\u0442\u0430   'layout' =&gt; [     'title' =&gt; '\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438',   ], ];  include('..\/..\/sp.php'); ?&gt; &lt;form action=&quot;\/articles\/create.php&quot; method=&quot;POST&quot;&gt;     &lt;div&gt;       &lt;input type=&quot;text&quot; name=&quot;title&quot; placeholder=&quot;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a&quot;\/&gt;     &lt;\/div&gt;     &lt;div&gt;       &lt;textarea name=&quot;content&quot;&gt;&lt;\/textarea&gt;     &lt;\/div&gt;     &lt;div&gt;         &lt;input type=&quot;submit&quot; value=&quot;\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c&quot;\/&gt;     &lt;\/div&gt; &lt;\/form&gt;<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u0420\u043e\u0443\u0442\u0438\u043d\u0433 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">\u25be articles\/   \u25b8 _locale\/   \u25b8 create\/   \u25be edit\/       index.php \/\/ \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438   \u25b8 view\/     create.php \/\/ \u042d\u043a\u0448\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438     delete.php     edit.php     index.php \/\/ \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u0442\u0430\u0442\u0435\u0439   index.php \/\/ \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u2014 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e PHP. \u0412\u044b\u0431\u043e\u0440 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u043e\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"preimuschestva-i-nedostatki\">\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438<\/h2>\n<p>  <\/p>\n<p><strong>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430 \u2014 \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u043c\u0435\u0435\u0442\u0435 HTML\/CSS \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e PHP, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/li>\n<li>\u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442 \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e PHP-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/li>\n<li>\u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u2014 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0430\u0439\u0442\u0430 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 PHP-\u0441\u043a\u0440\u0438\u043f\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043a\u0430\u043a \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0442\u0430\u043a \u0438 HTML-\u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 global \u2014 \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c\u0441\u044f<\/li>\n<li>\u041d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e PHP, \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"plaginy-i-moduli\">\u041f\u043b\u0430\u0433\u0438\u043d\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u0438<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <em>\u043f\u043b\u0430\u0433\u0438\u043d\u044b<\/em> \u0438 <em>\u043c\u043e\u0434\u0443\u043b\u0438<\/em> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041f\u0435\u0440\u0432\u044b\u0435, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0432\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">return [   'plugins' =&gt; [     '_plugins\/autoload.php',     '_plugins\/input.php',     '_plugins\/middleware.php',     '_plugins\/i18n.php',     '_plugins\/error.php',     '_plugins\/pdo.php',     '_plugins\/acl.php',     '_plugins\/layout.php',     '_plugins\/hook.php',   ],   ... ];<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Acl\">Acl<\/a> \u2014 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0441\u0430\u0439\u0442\u0430<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Autoload\">Autoload<\/a> \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u044f\u043c\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0438\u043b\u0438 \u043f\u0443\u0442\u0435\u0439 PSR-4<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Error\">Error<\/a> \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Hook\">Hook<\/a> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 (\u0445\u0443\u043a\u043e\u0432)<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/I18n\">I18n<\/a> \u2014 \u0438\u043d\u0442\u0435\u0440\u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Input\">Input<\/a> \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0432\u0432\u043e\u0434\u0430<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Layout\">Layout<\/a> \u2014 HTML-\u043e\u0431\u0435\u0440\u0442\u043a\u0438<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Middleware\">Middleware<\/a> \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\/Pdo\">Pdo<\/a> \u2014 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0411\u0414<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 composer:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">return [   'plugins' =&gt; [     'vendor\/autoload.php',     '_plugins\/markdown.php',     ...   ],   ... ];<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430\u0431\u043e\u0440\u043e\u043c PHP-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a &quot;\u041f\u0430\u043d\u0435\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430&quot; \u0438\u043b\u0438 &quot;\u0424\u043e\u0440\u0443\u043c&quot;.<\/p>\n<p>  <\/p>\n<h2 id=\"primer-prostogo-bloga\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u0433\u0430<\/h2>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u0433\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0431\u0449\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0430\u0439\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u0432 \u0444\u0430\u0439\u043b config.php \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php return [   'plugins' =&gt; [     '_plugins\/input.php',     '_plugins\/middleware.php',     '_plugins\/i18n.php',     '_plugins\/error.php',     '_plugins\/pdo.php',     '_plugins\/layout.php',   ],   'layout' =&gt; [     'title' =&gt; 'SimplePage',     'layout' =&gt; '_layout\/default.html',   ],   'pdo' =&gt; [     'dsn' =&gt; [       'mysql',       'dbname' =&gt; 'sp',       'charset' =&gt; 'UTF8',     ],     'username' =&gt; 'root',     'password' =&gt; 'root',     'options' =&gt; [       PDO::ATTR_PERSISTENT =&gt; true     ],   ], ];<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c layout, \u0441\u043e\u0437\u0434\u0430\u0432 \u0448\u0430\u0431\u043b\u043e\u043d _layout\/default.html, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0441\u0430\u0439\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt; &lt;html&gt;     &lt;head&gt;         &lt;title&gt;&lt;?= i18n($title) ?&gt;&lt;\/title&gt;         &lt;meta charset=&quot;utf-8&quot; \/&gt;         &lt;link href=&quot;\/_css\/style.css&quot; rel=&quot;stylesheet&quot;&gt;     &lt;\/head&gt;     &lt;body&gt;         &lt;?= $content ?&gt;     &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0430\u0439\u0442\u0430, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b index.php \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php include('sp.php') ?&gt; &lt;h1&gt;Hello world&lt;\/h1&gt; &lt;p&gt;   \u041c\u043e\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 &lt;p&gt; &lt;ul&gt;     &lt;li&gt;         &lt;a href=&quot;\/articles&quot;&gt;\u0421\u0442\u0430\u0442\u044c\u0438&lt;\/a&gt;     &lt;\/li&gt; &lt;\/ul&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u0442\u0430\u0442\u0435\u0439 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0432 \u0411\u0414), \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b articles\/index.php \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php $start = isset($_GET['start'])? (int) $_GET['start'] : 0; $offset = isset($_GET['offset'])? (int) $_GET['offset'] : 2;  $sp = [   'layout' =&gt; [     'title' =&gt; 'Articles',   ],   'pdo' =&gt; [     'queries' =&gt; [       'articles' =&gt; [         'SELECT * FROM article LIMIT :start, :offset',         'params' =&gt; [           'start' =&gt; $start,           'offset' =&gt; $offset,         ],       ],       'articlesCount' =&gt; [         'SELECT COUNT(*) FROM article',       ],     ],   ], ]; include('..\/sp.php'); $articlesCount = $articlesCount-&gt;fetchColumn(); ?&gt; &lt;h1&gt;\u0421\u0442\u0430\u0442\u044c\u0438&lt;\/h1&gt; &lt;p&gt;   &lt;ul&gt;       &lt;?php foreach($articles as $article): ?&gt;           &lt;li&gt;               &lt;a href=&quot;\/articles\/view?id=&lt;?= $article-&gt;id ?&gt;&quot;&gt;                   &lt;?= $article-&gt;title ?&gt;               &lt;\/a&gt;           &lt;\/li&gt;       &lt;?php endforeach; ?&gt;   &lt;\/ul&gt;   &lt;ul&gt;       &lt;li&gt;           \u0412\u0441\u0435\u0433\u043e &lt;?= i18n_plural($articlesCount, '%d article') ?&gt;       &lt;\/li&gt;       &lt;li&gt;         &lt;a href=&quot;\/articles\/create&quot;&gt;&lt;?= i18n('create') ?&gt;&lt;\/a&gt;       &lt;\/li&gt;       &lt;li&gt;         &lt;a href=&quot;\/articles?start=&lt;?= $start - $offset ?&gt;&quot;&gt;&lt;?= i18n('prev') ?&gt;&lt;\/a&gt;       &lt;\/li&gt;       &lt;li&gt;         &lt;a href=&quot;\/articles?start=&lt;?= $start + $offset?&gt;&quot;&gt;&lt;?= i18n('next') ?&gt;&lt;\/a&gt;       &lt;\/li&gt;   &lt;\/ul&gt; &lt;\/p&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b articles\/_locale\/ru_RU.php \u0434\u043b\u044f \u0435\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php return [   '' =&gt; [     'plural_forms' =&gt; function($n){       if($n % 10 == 1 &amp;&amp; $n % 100 != 11){         return 0;       }       elseif($n % 10 &gt;= 2 &amp;&amp; $n % 10 &lt;= 4 &amp;&amp; ($n % 100 &lt; 10 || $n % 100 &gt;= 20)){         return 1;       }       else{         return 2;       }     },   ],   '%d article' =&gt; [     '%d \u0441\u0442\u0430\u0442\u044c\u044f',     '%d \u0441\u0442\u0430\u0442\u044c\u0438',     '%d \u0441\u0442\u0430\u0442\u0435\u0439',   ],   'Articles' =&gt; '\u0421\u0442\u0430\u0442\u044c\u0438',   'create' =&gt; '\u0441\u043e\u0437\u0434\u0430\u0442\u044c',   'prev' =&gt; '\u043d\u0430\u0437\u0430\u0434',   'next' =&gt; '\u0432\u043f\u0435\u0440\u0435\u0434', ];<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u044d\u043a\u0448\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0431\u043b\u043e\u0433\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b articles\/create.php:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php if($_SERVER['REQUEST_METHOD'] != 'POST'){   http_response_code(404);   exit; }  $sp = [   'pdo' =&gt; [     'queries' =&gt; [       [         'INSERT INTO article (title, content) VALUES (:title, :content)',         'params' =&gt; [           'title' =&gt; $_POST['title'],           'content' =&gt; $_POST['content'],         ],       ],     ],   ], ];  include('..\/sp.php'); header('Location: \/articles\/view?id=' . pdo_build($sp['pdo'])-&gt;lastInsertId(), 302);<\/code><\/pre>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/328002\/\"> https:\/\/habrahabr.ru\/post\/328002\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>\u0425\u043e\u0447\u0443<\/strong> \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0425\u0430\u0431\u0440\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c PHP-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c, \u0432\u044b\u0440\u043e\u0441\u0448\u0438\u043c \u0438\u0437 \u0438\u0434\u0435\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c\u0430 \u0438 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><strong>\u041d\u0435 \u0445\u043e\u0447\u0443<\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0439, \u0432\u043f\u0430\u0440\u0438\u0432\u0430\u044e\u0449\u0438\u043c \u0432\u0430\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430\u0434 \u043a\u0430\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage-example\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u043b\u043e\u0433\u0430<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/wiki\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bashka\/simplepage\/issues\">\u0411\u0430\u0433\u0438 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/gitter.im\/simplepage-php\/Lobby\">\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u0441\u0432\u044f\u0437\u044c<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php $sp = [   'layout' =&gt; [     'title' =&gt; '\u0421\u0442\u0430\u0442\u044c\u044f',   ],   'input' =&gt; [     INPUT_GET =&gt; [       'id' =&gt; [         FILTER_SANITIZE_NUMBER_INT,         [           'filter' =&gt; FILTER_VALIDATE_INT,           'options' =&gt; ['min_range' =&gt; 1],           'comment' =&gt; '\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c'         ]       ],     ],   ],   'pdo' =&gt; [     'queries' =&gt; [       'article' =&gt; [         'SELECT * FROM article WHERE id = :id',         'params' =&gt; [           'id' =&gt; &amp;$_GET['id'],         ],       ],     ],   ], ]; include('..\/..\/sp.php'); $article = $article-&gt;fetch(); ?&gt; &lt;h1&gt;     &lt;?= $article-&gt;title ?&gt; &lt;\/h1&gt; &lt;div&gt;     &lt;?= $article-&gt;content ?&gt; &lt;\/div&gt; &lt;ul&gt;     &lt;li&gt;         &lt;a href=&quot;\/articles\/edit?id=&lt;?= $article-&gt;id ?&gt;&quot;&gt;edit&lt;\/a&gt;     &lt;\/li&gt;     &lt;li&gt;         &lt;a href=&quot;\/articles\/delete.php?id=&lt;?= $article-&gt;id ?&gt;&quot;&gt;delete&lt;\/a&gt;     &lt;\/li&gt; &lt;\/ul&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u044d\u043a\u0448\u0435\u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php &lt;?php if($_SERVER['REQUEST_METHOD'] != 'GET'){   http_response_code(404);   exit; } $sp = [   'input' =&gt; [     INPUT_GET =&gt; [       'id' =&gt; [         FILTER_SANITIZE_NUMBER_INT,         [           'filter' =&gt; FILTER_VALIDATE_INT,           'options' =&gt; ['min_range' =&gt; 1],           'comment' =&gt; '\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c'         ]       ],     ],   ],   'pdo' =&gt; [     'queries' =&gt; [       [         'DELETE FROM article WHERE id = :id',         'params' =&gt; [           'id' =&gt; &amp;$_GET['id'],         ],       ]     ],   ], ]; include('..\/sp.php'); header('Location: \/articles', 302);<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f, \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0435\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-285923","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285923"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285923\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}