{"id":195,"date":"2007-07-22T12:29:32","date_gmt":"2007-07-22T03:29:32","guid":{"rendered":"http:\/\/clouds.tokyo\/blog\/?p=195"},"modified":"2017-02-28T17:36:09","modified_gmt":"2017-02-28T08:36:09","slug":"php_backtrace","status":"publish","type":"post","link":"https:\/\/clouds.tokyo\/blog\/php_backtrace\/","title":{"rendered":"\u3010PHP\u3011__FILE__\u3067\u306f\u53d6\u5f97\u3067\u304d\u306a\u3044\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u77e5\u308a\u305f\u3044"},"content":{"rendered":"<p>__FILE__\u306f\u5b9f\u884c\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u304c\u3001<br \/>\n\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306a\u3069\u3092\u5229\u7528\u3057\u3066\u3044\u3066\u3001\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d\u306f<\/p>\n<pre>\r\ndebug_backtrace()\r\n<\/pre>\n<p>\u304c\u4fbf\u5229\u3067\u3059\u3002<br \/>\n\u3053\u306e\u95a2\u6570\u306e\u7d50\u679c\u306f\u914d\u5217\u3067\u53d7\u53d6\u308a\u307e\u3059\u3002<br \/>\n\u6dfb\u3048\u5b57\u304c\u5927\u304d\u3044\u307b\u3046\u304c\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u60c5\u5831\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001<\/p>\n<pre>\r\n$trace = debug_backtrace();\r\n$file = $trace[1]['file'];\r\n<\/pre>\n<p>\u3067\u3001\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>__FILE__\u306f\u5b9f\u884c\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u304c\u3001 \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306a\u3069\u3092\u5229\u7528\u3057\u3066\u3044\u3066\u3001\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d\u306f debug_backtrace() \u304c\u4fbf\u5229\u3067\u3059\u3002 \u3053\u306e\u95a2\u6570\u306e\u7d50\u679c\u306f\u914d\u5217\u3067\u53d7\u53d6\u308a\u307e\u3059\u3002 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/clouds.tokyo\/blog\/php_backtrace\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010PHP\u3011__FILE__\u3067\u306f\u53d6\u5f97\u3067\u304d\u306a\u3044\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u77e5\u308a\u305f\u3044&#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":[56,57,96],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pezW3u-39","jetpack-related-posts":[{"id":506,"url":"https:\/\/clouds.tokyo\/blog\/php_fgc_stat\/","url_meta":{"origin":195,"position":0},"title":"\u3010PHP\u3011file_get_contents\u306e\u30a8\u30e9\u30fc\u51e6\u7406","author":"yamamoto","date":"2007\u5e7411\u670813\u65e5","format":false,"excerpt":"file_get_contents\u306f\u30d5\u30a1\u30a4\u30eb\u53d6\u5f97\u3060\u3051\u3067\u306a\u304f\u3001\u4ed6\u306e\u30b5\u30a4\u30c8\u306eAPI\u3092\u30b3\u30fc\u30eb\u3057\u305f\u308a\u3059\u308b\u3068\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":[]},{"id":431,"url":"https:\/\/clouds.tokyo\/blog\/aws_ec2_s3\/","url_meta":{"origin":195,"position":1},"title":"\u3010AWS\u3011EC2\u304b\u3089S3\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u305b\u308b(PHP)","author":"yamamoto","date":"2016\u5e746\u670811\u65e5","format":false,"excerpt":"\u307e\u305a\u306fSDK\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002 Releases \u00b7 aws\/aws-sdk-php \u00b7 Git\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":195,"position":2},"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":1421,"url":"https:\/\/clouds.tokyo\/blog\/linux-file-count2\/","url_meta":{"origin":195,"position":3},"title":"\u3010Linux\u3011\u30d5\u30a1\u30a4\u30eb\u6570\u3092\u307e\u3068\u3081\u3066\u6570\u3048\u308b","author":"yamamoto","date":"2020\u5e7411\u670821\u65e5","format":false,"excerpt":"\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u542b\u3081\u3066\u4e00\u6c17\u306b\u30d5\u30a1\u30a4\u30eb\u6570\u3092\u8abf\u3079\u305f\u3044\u3068\u304d \u30b7\u30a7\u30eb\u3067\u76f4\u63a5\u4ee5\u4e0b\u3092\u305f\u305f\u304f for x in \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":203,"url":"https:\/\/clouds.tokyo\/blog\/php_argv\/","url_meta":{"origin":195,"position":4},"title":"\u3010PHP\u3011PHP\u30d5\u30a1\u30a4\u30eb\u5b9f\u884c\u6642\u306b\u6e21\u3055\u308c\u305f\u5f15\u6570\u3092\u53d6\u5f97\u3059\u308b","author":"yamamoto","date":"2005\u5e746\u670830\u65e5","format":false,"excerpt":"\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306a\u3069\u304b\u3089\u5b9f\u884c\u3055\u308c\u305f\u969b\u306b\u6e21\u3055\u308c\u305f\u5f15\u6570\u306f $argv \u3068\u3044\u3046\u914d\u5217\u5909\u6570\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \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":608,"url":"https:\/\/clouds.tokyo\/blog\/js_upload\/","url_meta":{"origin":195,"position":5},"title":"\u3010JavaScript\u3011\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3067\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u62ec\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9","author":"yamamoto","date":"2017\u5e744\u67086\u65e5","format":false,"excerpt":"\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3067\u4e00\u6c17\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30da\u30fc\u30b8\u3001 \u5b9f\u306f\u3051\u3063\u3053\u3046\u7c21\u5358\u306b\u4f5c\u308c\u307e\u3059\u3002Aj\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\/195"}],"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=195"}],"version-history":[{"count":2,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/195\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}