{"id":188,"date":"2010-10-21T12:05:27","date_gmt":"2010-10-21T03:05:27","guid":{"rendered":"http:\/\/clouds.tokyo\/blog\/?p=188"},"modified":"2017-02-28T17:36:09","modified_gmt":"2017-02-28T08:36:09","slug":"php_cookie","status":"publish","type":"post","link":"https:\/\/clouds.tokyo\/blog\/php_cookie\/","title":{"rendered":"\u3010PHP\u3011Cookie\u3078\u306e\u30c7\u30fc\u30bf\u4fdd\u5b58\u30fb\u53d6\u5f97\u30fb\u524a\u9664"},"content":{"rendered":"<p>Cookie\u3078\u306e\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u306f<\/p>\n<pre>\r\nsetcookie('\u30ad\u30fc', '\u5024', \u6709\u52b9\u671f\u9650, '\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9');\r\n<\/pre>\n<p>\u305f\u3068\u3048\u3070\u6709\u52b9\u671f\u9650\u30921\u30f6\u6708\u3068\u3059\u308b\u306a\u3089<\/p>\n<pre>\r\nsetcookie('user_name', $user_name, time() + 60 * 60 * 24 * 30, '\/app1\/');\r\n<\/pre>\n<p>\u4fdd\u5b58\u3057\u305fCookie\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f<\/p>\n<pre>\r\n$_COOKIE['user_name']\r\n<\/pre>\n<p>\u307e\u305f\u3001\u4fdd\u5b58\u3057\u305fCookie\u3092\u524a\u9664\u306b\u306f\u3001\u6709\u52b9\u671f\u9650\u30921\u79d2\u5f8c\u306a\u3069\u306b\u3057\u3066\u4e0a\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\nsetcookie('user_name', '', time() + 1, '\/app1\/');\r\n<\/pre>\n<p>\u6bce\u56de\u30ed\u30b0\u30a4\u30f3\u3057\u306a\u304f\u3066\u3082\u3044\u3044\u3088\u3046\u306b\u30ed\u30b0\u30a4\u30f3\u60c5\u5831\u3092\u8a18\u9332\u3059\u308b\u30b5\u30a4\u30c8\u304c\u5897\u3048\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u30bb\u30c3\u30b7\u30e7\u30f3\u5909\u6570\u306e\u4ee3\u308f\u308a\u306bCookie\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cookie\u3078\u306e\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u306f setcookie(&#8216;\u30ad\u30fc&#8217;, &#8216;\u5024&#8217;, \u6709\u52b9\u671f\u9650, &#8216;\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9&#8217;); \u305f\u3068\u3048\u3070\u6709\u52b9\u671f\u9650\u30921\u30f6\u6708\u3068\u3059\u308b\u306a\u3089 setcookie(&#8216;user_name&#8217;, $user_name, t &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/clouds.tokyo\/blog\/php_cookie\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010PHP\u3011Cookie\u3078\u306e\u30c7\u30fc\u30bf\u4fdd\u5b58\u30fb\u53d6\u5f97\u30fb\u524a\u9664&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":""},"categories":[2],"tags":[53,96],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pezW3u-32","jetpack-related-posts":[{"id":685,"url":"https:\/\/clouds.tokyo\/blog\/html5_ls\/","url_meta":{"origin":188,"position":0},"title":"\u3010HTML5\u3011localStorage\u3092\u4f7f\u3063\u3066\u30ed\u30fc\u30ab\u30ebPC\u306b\u9023\u60f3\u914d\u5217DB\u3092\u69cb\u7bc9\u3059\u308b","author":"yamamoto","date":"2017\u5e744\u670821\u65e5","format":false,"excerpt":"HTML5\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305flocalStorage\u306f \u305d\u306e\u540d\u306e\u901a\u308a\u3001\u30ed\u30fc\u30ab\u30ebPC\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1410,"url":"https:\/\/clouds.tokyo\/blog\/php-security3\/","url_meta":{"origin":188,"position":1},"title":"\u3010PHP\u3011https\u306e\u307fCookie\u3092\u8a31\u53ef\u3059\u308b","author":"yamamoto","date":"2020\u5e746\u670813\u65e5","format":false,"excerpt":"https\u306e\u307fCookie\u3092\u8a31\u53ef\u3059\u308b \/\/ https\u306e\u307f\u8a31\u53ef\u3059\u308b ini_set('session\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1406,"url":"https:\/\/clouds.tokyo\/blog\/php-security1\/","url_meta":{"origin":188,"position":2},"title":"\u3010PHP\u3011JavaScript\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u5bfe\u7b56","author":"yamamoto","date":"2020\u5e744\u67088\u65e5","format":false,"excerpt":"JavaScript\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u5bfe\u7b56 \/\/ JavaScript\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u5bfe\u7b561\uff08http\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1888,"url":"https:\/\/clouds.tokyo\/blog\/php_bom_remove\/","url_meta":{"origin":188,"position":3},"title":"PHP\u3067\u30d5\u30a1\u30a4\u30eb\u306bBOM\u304c\u3064\u3044\u3066\u3044\u305f\u3089\u524a\u9664\u3059\u308b","author":"yamamoto","date":"2026\u5e741\u670815\u65e5","format":false,"excerpt":"\/\/ BOM\u304c\u3064\u3044\u3066\u3044\u305f\u3089BOM\u3092\u524a\u9664\u3057\u3066\u4fdd\u5b58 $filepath = 'hoge.csv'; $c\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":198,"url":"https:\/\/clouds.tokyo\/blog\/php_upload\/","url_meta":{"origin":188,"position":4},"title":"\u3010PHP\u3011\u7c21\u5358\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9","author":"yamamoto","date":"2006\u5e749\u670819\u65e5","format":false,"excerpt":"PHP\u5074\u3067\u53d7\u53d6\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u95a2\u6570\u3067\u3059\u3002\u7c21\u5358\u3067\u3059\u306d\u3002 function upload_file\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":366,"url":"https:\/\/clouds.tokyo\/blog\/linux_ssl_le\/","url_meta":{"origin":188,"position":5},"title":"\u3010Linux\u3011\u3068\u3046\u3068\u3046SSL\u8a3c\u660e\u66f8\u306f\u7121\u6599\u3067\u53d6\u5f97\u3067\u304d\u308b\u6642\u4ee3\u306b","author":"yamamoto","date":"2016\u5e747\u67086\u65e5","format":false,"excerpt":"\u6614\u306fSSL\u8a3c\u660e\u66f8\u306f\u500b\u4eba\u304c\u6c17\u8efd\u306b\u5c0e\u5165\u3067\u304d\u308b\u3088\u3046\u306a\u5b89\u3044\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u4eca\u306f\u5343\u5186\u304f\u3089\u3044\u3067\u53d6\u5f97\u3067\u304d\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/188"}],"collection":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":1,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"predecessor-version":[{"id":189,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions\/189"}],"wp:attachment":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}