{"id":835,"date":"2023-12-30T23:59:54","date_gmt":"2023-12-30T14:59:54","guid":{"rendered":"https:\/\/web.cloudfree.jp\/journal\/?p=835"},"modified":"2024-01-01T18:57:18","modified_gmt":"2024-01-01T09:57:18","slug":"wordpress%e3%81%ae%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e6%9b%b4%e6%96%b0%e3%81%ab%e3%81%a8%e3%82%82%e3%81%aa%e3%81%86%e3%83%ab%e3%83%bc%e3%83%81%e3%83%b3%e3%83%af%e3%83%bc%e3%82%af%e3%82%921c","status":"publish","type":"post","link":"https:\/\/web.cloudfree.jp\/journal\/wordpress%e3%81%ae%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e6%9b%b4%e6%96%b0%e3%81%ab%e3%81%a8%e3%82%82%e3%81%aa%e3%81%86%e3%83%ab%e3%83%bc%e3%83%81%e3%83%b3%e3%83%af%e3%83%bc%e3%82%af%e3%82%921c\/","title":{"rendered":"WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u66f4\u65b0\u306b\u3068\u3082\u306a\u3046\u30eb\u30fc\u30c1\u30f3\u30ef\u30fc\u30af\u30921Click\u5316\u3059\u308b"},"content":{"rendered":"<h3 class=\"wp-block-post-title\">WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u66f4\u65b0\u306b\u3068\u3082\u306a\u3046\u30eb\u30fc\u30c1\u30f3\u30ef\u30fc\u30af\u30921Click\u5316\u3059\u308b<\/h3>\n\n\n<p class=\"has-tertiary-color has-text-color has-background has-small-font-size\" style=\"background-color:#8d8dd8;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">2023-12-30 \u8a18\u8f09<br>\u6982\u8981 : WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u66f4\u65b0\u306b\u3068\u3082\u306a\u3046\u30eb\u30fc\u30c1\u30f3\u30ef\u30fc\u30af\u30921Click\u5316\u3059\u308b<br>Keyword : WordPress, \u66f4\u65b0, <\/p>\n\n\n\n<p>WordPress\u306f\u66f4\u65b0\u3059\u308b\u3068\u3001\u66f8\u304d\u52a0\u3048\u3066\u3044\u305f\u5909\u66f4\u306f\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u306a\u308b\u3079\u304f\u305d\u3046\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u3001\u66f4\u65b0\u3067\u7f6e\u304d\u63db\u308f\u308b\u30d5\u30a1\u30a4\u30eb\u81ea\u4f53\u306f\u5909\u66f4\u305b\u305a\u306b\u3001\u5916\u91ce\u304b\u3089\u64cd\u4f5c\u3059\u308b\u306e\u304c\u30b3\u30c4\u3067\u3059\u304c\u3001\u305d\u3046\u3082\u3044\u304b\u306a\u3044\u30b1\u30fc\u30b9\u3082\u3042\u308a\u307e\u3059\u3002<br><br>\u305d\u3053\u3067\u4f7f\u3044\u3084\u3059\u3044 php\u306eftp\u3092\u7528\u3044\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u6c7a\u307e\u3063\u305f\u624b\u9806\u3067\u66f8\u304d\u63db\u3048\u308bphp\u51e6\u7406\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u306f\u3084\u3044\u8a71\u300c\u66f4\u65b0\u30d0\u30c3\u30c1\u300d\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>  \/\/\u57fa\u672c\u8a2d\u5b9a\n  mb_language(&#39;Japanese&#39;);\n  mb_internal_encoding(&#39;UTF-8&#39;);\n  date_default_timezone_set(&quot;Asia\/Tokyo&quot;);\n  setlocale(LC_ALL, &#39;ja_JP.UTF-8&#39;);\n\n  $sPlugin = $_GET[&#39;plugin&#39;] ?? &#39;nop&#39;;\n  $sServer = $_GET[&#39;server&#39;] ?? &#39;localhost&#39;;\n\n  $cParam = array();\n\n  if ($sPlugin === &#39;nop&#39;) {\n  } elseif ($sPlugin === &#39;wpplugin&#39;) {\n    \/\/================================================================================\n    \/\/ \u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u66f4\u65b0\u3057\u305f\u5f8c\u3001\u7ba1\u7406\u753b\u9762\u306b\u5e83\u544a\u3092\u51fa\u3055\u305b\u306a\u3044\u3088\u3046\u306b\u4fee\u6b63\u3059\u308b\n    \/\/================================================================================\n    $cParam[&#39;local_temp_folder&#39;] = &#39;c:\/home\/cfsid\/cfsid.cloudfree.jp\/public_html\/temp\/&#39;;\n    \/\/$ftp \u751f\u6210\n    if ($sServer === &#39;localhost&#39;) {\n      \/\/ftp-local\n      $ftp = getftp(&#39;localhost\/ftpuser\/password&#39;);\n      ftp_chdir($ftp, &#39;\/cloudfree_home\/cfsid\/cfsid.cloudfree.jp\/public_html\/mywprdpress\/wp-content\/plugins\/wpplugin\/includes\/admin\/&#39;);\n    }\n    if ($sServer === &#39;cloudfree&#39;) {\n      \/\/ftp-cloudfree\n      $ftp = getftp(&#39;svXX.cloudfree.ne.jp\/cfsid_ftpuser@cfsid.cloudfree.jp\/password&#39;);\n      ftp_chdir($ftp, &#39;\/cfsid.cloudfree.jp\/public_html\/mywprdpress\/wp-content\/plugins\/wpplugin\/includes\/admin\/&#39;);\n    }\n\n    \/\/[\u4f5c\u696d\u5185\u5bb9]\n    \/\/class-admin.php \u306e wpplugin()-&gt;add_notice \u3067\u59cb\u307e\u308b\u884c\u3092\/\/\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\n    \/\/step1:ftp\u3067download &gt; step2:\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6 &gt; step3:Upload\n    \/\/step1:ftp\u3067download\n    $sLocalFile = $cParam[&#39;local_temp_folder&#39;].&#39;class-admin.php&#39;;\n    ftp_get($ftp, $sLocalFile, &#39;class-admin.php&#39;, FTP_BINARY);\n\n    \/\/step2:\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\n    $sContent = file_get_contents($sLocalFile);\n    $sContent = str_replace(&#39;wpplugin()-&gt;add_notice&#39;, &#39;\/\/wpplugin()-&gt;add_notice&#39;, $sContent);\n    file_put_contents($sLocalFile, $sContent);\n\n    \/\/step3:Upload\n    ftp_put($ftp, &#39;class-admin.php&#39;, $sLocalFile, FTP_BINARY);\n    sleep(1); \/\/\u4e00\u547c\u5438\u304a\u3044\u3066\n    unlink($sLocalFile);\n\n    \/\/$ftp \u5f8c\u59cb\u672b\n    ftp_close($ftp);\n\n    echo &#39;\u51e6\u7406\u5b8c\u4e86&#39;;\n  }\n\n  \/\/ === function ================================================================\n  \/\/FTP\u30b5\u30fc\u30d0\u3078\u306e\u63a5\u7d9a\n  function getftp($sServerVal) {\n    $asServerVal = explode(&#39;\/&#39;, $sServerVal);\n    $ftp = ftp_connect($asServerVal[0]) or die(&quot;Couldn&#39;t connect to $asServerVal[0]&quot;);\n    ftp_login($ftp, $asServerVal[1], $asServerVal[2]) or die(&quot;Couldn&#39;t login&quot;);\n    return $ftp;\n  }\n<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Wordpress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u66f4\u65b0\u306b\u3068\u3082\u306a\u3046\u30eb\u30fc\u30c1\u30f3\u30ef\u30fc\u30af\u30921Click\u5316\u3059\u308b<\/p>\n","protected":false},"author":1,"featured_media":836,"comment_status":"open","ping_status":"closed","sticky":false,"template":"wp-custom-template-x24-index","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[40,23,12,18,24],"_links":{"self":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts\/835"}],"collection":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/comments?post=835"}],"version-history":[{"count":0,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts\/835\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/media\/836"}],"wp:attachment":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/media?parent=835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/categories?post=835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/tags?post=835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}