Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ã¯ããã« ç§ã¯ãããã¾ã§ããã¤ãã®PJã§PHPã®éçºãããããèªåã§ãåå¼·ãã¦ãã¢ããªãä½ã£ãããã¦ãã¾ããã ãã®ä¸ã§ãåãPJã«åç»ãã¦ããæ¹ããæãã¦ããã ããæè¡ãèªåã§ããã¯å¿å¾ã¦ããããã¨æã£ãäºãã¾ã¨ãã¦ã¿ã¾ããã ã¾ããæåã«ãã®è¨äºãæ¸ããã®ã¯2018å¹´3æã§ãããåå¹´å¾ã1å¹´å¾ãããã«ãã®å ã¯ã¬ã©ãªã¨ç¶æ³ãå¤ãã£ã¦ããå¯è½æ§ãããã¾ãã ãã®å ´åãã§ããã ãææ°ã®æ å ±ã«æ´æ°ãç¶ãããã§ãã 1. ãã¼ã¸ã§ã³ ãããããããæ°è¦ã§PHPã§ä½ããä½ãå§ãããªãééããªã7ç³»ã使ã£ãæ¹ãããã§ãã 5ç³»ã«æ¯ã¹ã¦è¨èªã¨ãã¦ã®å¦çé度ãä¸ãã£ã¦ãã¾ãããæ°æ©è½ãå¢ãã¦ãã¾ãã æããããå¤ããããã¯ãã®ä¿å®ãªã©ã§ãã©ããã¦ã5ç³»ã使ãç¶ããªããã°ãããªãPJãããã¨æãã¾ããã 5ç³»ã§ä¸çªæ°ãã5.6ã§ãã2018å¹´å ã«ã»ãã¥ãªãã£ãµãã¼ããåãã¦ãã¾ãã®ã§ãå¤å°å¤§å¤ã§ã7ç³»ã¸ã®
ã¨ã°ã¼ã¯ãã£ããµã㪠PHP 5.5.21ãPHP 5.6.5 以éãPHPã«PDO::MYSQL_ATTR_MULTI_STATEMENTSã¨ãããªãã·ã§ã³ã追å ãããPDO+MySQLã®çµã¿åããã§ãSQLã®è¤æãç¦æ¢ã§ããããã«ãªã£ãããã®è¨å®ã¯SQLã¤ã³ã¸ã§ã¯ã·ã§ã³ã®ç·©åçã¨ãã¦æå¹ã§ããã ã¯ããã« 2013å¹´12æã«å ¬éãã PHP+PDO+MySQLã®çµã¿åããã§ã¯SQLã¤ã³ã¸ã§ã¯ã·ã§ã³æ»æã§è¤æå¼ã³åºããå¯è½Â ã«ã¦ãPDOã¨MySQLã®çµã¿åããã§ãSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ã®æèã§è¤æå¼ã³åºããå¯è½ã§ãããã¨ãå ±åãã¦ãã¾ãããããã®å¾ã®PHPã®ãã¼ã¸ã§ã³ã¢ããã§ãè¤æå®è¡ãç¦æ¢ãããªãã·ã§ã³ã追å ããã¦ãã¾ããã®ã§å ±åãã¾ãã 対象ã®ãã¼ã¸ã§ã³ã¯ä»¥ä¸ã®éãã§ãã PHP 5.5.21 以é PHP 5.6.5 以é å ¨ã¦ã® PHP 7.0ã7.1 åè¿°ã®è¨äºãæ¸ããå¾ã3大
ãã®æ稿㯠PHP Advent Calendar 2016 ã®16æ¥ç®ã®è¨äºã§ãã ã¨ã°ã¼ã¯ãã£ããµã㪠PHPã®ãã¼ã¸ã§ã³éã®æåã®éãã調æ»ãããã¼ã«ã¨ãã¦ã@hnwã«ããphpallãããããæ¹é ããphpcgiallããã£ãããç¾å®ã®PHPã®å©ç¨ç°å¢ã¨ã¯éãããããæ¤è¨¼ã®å¦¨ãã«ãªãå ´åããã£ãããã®ãããPHPã®ãã¼ã¸ã§ã³æ¯ã«Apacheãç°ãªããã¼ãã§åãããã¨ã«ãããå ¨ã¦ã®ãã¼ã¸ã§ã³(229種)ã®PHPãApacheã¢ã¸ã¥ã¼ã«ã¨ãã¦åä½ããããã¨ã«æåããmodphpallã¨å½åãããmodphpallã¯PHPã®æ¤è¨¼ã«æå¹ã§ãããã¨ãããã£ãªãã¸ãªã¿ã¼ã³ã®ã¿ã§èµ·ããPHPãããã¤ã³ã¸ã§ã¯ã·ã§ã³ãç¨ãã¦ç¢ºèªããã ã¯ããã« æ¨æ¥ã®æ¥è¨ã§ã¯ãPHPã®å ¨ãã¼ã¸ã§ã³ãCGIã¢ã¼ãã§è©¦ã phpcgiall ã«ã¤ãã¦ç´¹ä»ãã¾ãããHTTPãããã¤ã³ã¸ã§ã¯ã·ã§ã³ãã»ãã·ã§ã³ã®æåã«ã¤ãã¦
PHPã®æåã調ã¹ã¦ããã¨ãããã¥ã¢ã«ã«ããChangeLogã«ãè¼ã£ã¦ããªãå¤æ´ã«ãã°ãã°ééãã¾ãããã¨ãã°ãPCREç³»é¢æ°ï¼preg_xxxxï¼ã®æ£è¦è¡¨ç¾æå®ï¼ç¬¬1å¼æ°ï¼ã«ããã¦ãéå»ã®PHPã§ã¯NULLãã¤ãã許容ãã¦ãã¾ããããæè¿ã®PHPã§ã¯ãæ£è¦è¡¨ç¾ä¸ã®NULLãã¤ããã¨ã©ã¼ã«ãã¦ãã¾ãããã®å¤æ´ã¯ãããã¥ã¢ã«ã«ã¯è¼ã£ã¦ããããChangeLogã«ã¯è¨è¼ããã¦ãããã®ã®NULLãã¤ãã¨ã¯æ¸ãã¦ããªãã®ã§ãã¡ãã£ã¨æ°ãã¤ãã«ããã§ããã Fixed bug #55856 (preg_replace should fail on trailing garbage) ãã®ãããªå ´åãã½ã¼ã¹ã³ã¼ãã®è©²å½ç®æã調ã¹ãããé©å½ã«ããããã¤ãããã¼ã¸ã§ã³ã®PHPããã«ããã¦è©¦ããªã©ã®ææ³ãã¨ããã¦ãããã¨æãã¾ããã@hnwããã phpallããçºè¡¨ããããã¨ã§ããã®ç¨®ã®èª¿æ»ãä¸æã«æ¥½ã«
PHP 5ããPHP 7ã¸ã®ç§»è¡ã§ãTumblrã¯ã¬ã¤ãã³ã·ãååãCPUè² è·ãåæ¸ããã¹ããã¼ã«ã§PHP 7ã¸ã®ç§»è¡ã«åé¡ãªããããã§ã㯠PHPã®10å¹´ã¶ãã®ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ããã¨ãã¦æ¨å¹´12æã«ç»å ´ãããPHP 7ãã¯ãPHP 5ã¨æ¯ã¹ã¦2å以ä¸ã®å®è¡é度ãå®ç¾ããã¨ãªãªã¼ã¹åããPHPã®çã¿ã®è¦ªã§ããRasmus Lerdorfæ°èªèº«ã説æãã¦ãã¾ããã PHP 5ããPHP 7ã¸ã¨å é¨ã·ã¹ãã ã®ã¢ãããã¼ããè¡ã£ãTumblrã¯ãã®ææãããã°ã§çºè¡¨ãããããã«PHP 7ã®ã¸ç§»è¡ãããã¨ã§å®è¡é度ã2åã«ãªã£ããã¨ãè£ä»ãã¦ãã¾ãã éç解æã¨èªåãã¹ãã§PHP 7ã¸ã®ç§»è¡ã«åé¡ããªãããç¢ºèª Tumblrãå ¬éããããã°ãTumblr Engineering â PHP 7 at Tumblrãã«ããã¨ãTumblrããã®å é¨ã§ç¨¼åãã¦ããã·ã¹ãã ãPHP 5ããPHP 7
2. 徳丸浩ã®èªå·±ç´¹ä» ⢠çµæ´ â 1985å¹´ 京ã»ã©æ ªå¼ä¼ç¤¾å ¥ç¤¾ â 1995å¹´ 京ã»ã©ã³ãã¥ãã±ã¼ã·ã§ã³ã·ã¹ãã æ ªå¼ä¼ç¤¾(KCCS)ã«åºåã»è»¢ç± â 2008å¹´ KCCSéè·ãHASHã³ã³ãµã«ãã£ã³ã°æ ªå¼ä¼ç¤¾è¨ç« ⢠çµé¨ããã㨠â 京ã»ã©å ¥ç¤¾å½æã¯CADãè¨ç®å¹¾ä½å¦ãæ°å¤ã·ãã¥ã¬ã¼ã·ã§ã³ãªã©ãæ å½ â ãã®å¾ãä¼æ¥åãããã±ã¼ã¸ã½ããã®ä¼ç»ã»éçºã»äºæ¥åãæ å½ â 1999å¹´ãããæºå¸¯é»è©±åãã¤ã³ãã©ããã©ãããã©ã¼ã ã®ä¼ç»ã»éçºãæ å½ Webã¢ããªã±ã¼ã·ã§ã³ã®ã»ãã¥ãªãã£åé¡ã«ç´é¢ãç 究ã社å å±éãå¯ç¨¿ãªã©ãéå§ â 2004å¹´ã«KCCS社å ãã³ãã£ã¼ã¨ãã¦Webã¢ããªã±ã¼ã·ã§ã³ã»ãã¥ãªãã£äºæ¥ãç«ã¡ä¸ã ⢠ç¾å¨ â HASHã³ã³ãµã«ãã£ã³ã°æ ªå¼ä¼ç¤¾ 代表 http://www.hash-c.co.jp/ â ç¬ç«è¡æ¿æ³äººæ å ±å¦çæ¨é²æ©æ§ é常å¤ç ç©¶å¡ http://www.
ã¡ã«ã»ã³ãã»ãã¤ã¹ã¿ã¼ã¨ä¼¼ã¦éãªãã¢ã«ã´ãªãºã ãå®è£ ããã¦ãããã¨ãçºè¦ãã¦è©±é¡ã® PHP ã® mt_rand é¢æ°ã®å質ãçµ±è¨çã«æ¤è¨¼ãã¾ããï¼æããã¦ï¼PHP ã®ãå£ãããmt_rand ã¯å®å¿ãã¦ä½¿ããã¨ãã§ããã®ã§ããããâ¦â¦ï¼ ã¡ãªã¿ã«ï¼çµè«ããè¨ãã¨ï¼PHP ã®å£ãã mt_rand ã¯ï¼ï¼å°ãªãã¨ããã®ãã¹ãã®ç¯å²ã§ã¯ï¼æ¬å®¶ã¡ã«ã»ã³ãã»ãã¤ã¹ã¿ã¼ã¨éè²ãªãå質ãæã£ã¦ããããã§ãï¼ãã ãï¼æå¾ã« PHP ã®ä¹±æ°ã®å¥ã®æ¸å¿µç¹ã«ã¤ãã¦ãç´¹ä»ãã¾ãï¼ å£ãã mt_rand ã¨ã¯ PHP ã® mt_rand ã¯ï¼ããã¥ã¡ã³ãã«ããã¨ï¼æåãªä¹±æ°çæã¢ã«ã´ãªãºã ãã¡ã«ã»ã³ãã»ãã¤ã¹ã¿ã¼ããå©ç¨ãã¦é«å質ã®ä¹±æ°ãçæããé¢æ°ã§ãï¼ã¨ãããï¼ã©ãããä¸é¨ã§ã¯ç¥ããã¦ãããã¨ã¨ãã¦ï¼PHP ã® mt_rand ã®å®è£ ã«ã¯ãã°ãããï¼æ¬å®¶ã¡ã«ã»ã³ãã»ãã¤ã¹ã¿ã¼ã¨æåãä¸è´ãã¦ãã¾ããã§ããï¼
ãã®è©±ã PHP ã® mt_rand() ã¯ä¸è²«ãã¦å£ãã¦ãã(consistently broken)ããã - å¯ç©æ¯ç @Scaled_Wurm PHPã®mt_rand()ãå®è£ ã«ãã¹ããããã¨ãç¥ã£ãã®ã§ããPHPã®ã³ããããã°ã«ååãè¼ãããâ( ï½¥ã ï½¥)Ùãã¨æã£ã¦ãã«ãªã¯ãéã£ãããä¸æ¦ãã¼ã¸ããããã©ããªãã¼ããããã 詳細 https://github.com/php/php-src/pull/1681/files ã¤ãã§ã«ãã¹ãã³ã¼ããä»ãããã©ãç´ãã¹ãã¯1æåã ãã twistã¨ãããã¯ãã®å®ç¾©ã1æåééãã¦ããã loBit(u)ã§ã¯ãªãloBit(v)ãæ£ããã #define twist(m,u,v) (m ^ (mixBits(u,v)>>1) ^ ((uint32_t)(-(int32_t)(loBit(u))) & 0x9908b0dfU)) ãã®ãã¯
PHPã§Mersenne Twisteræ³ã§æ¬ä¼¼ä¹±æ°ãçæããé¢æ°ã®mt_rand()ã«ãã°ãããåºåããããããã¨ãã話ãæµãã¦ãã¦ãããããã£ãã®ã§ç°¡åã«ã¾ã¨ãã¦ãã kusanoãããmt_rand()ã®å®è£ ã«9年以ä¸åãã1æåéãã§ãã°ããã£ããã¨ãè¦ã¤ãã¦ãæ°ã¶æå¾ã«ãã¼ã¸ããã(追è¨: æ£ç¢ºã«ã¯ãPHPçã®å®è£ ãä»ã¨ç°ãªã£ã¦ããã®ã¯åããç¥ããã¦ããããã*1 ) PHPã«éã£ã1æåä¿®æ£ãããã«ãªã¯ã¨ã¹ãããã¼ã¸ãããð mt_rand()ã®è¿ãå¤ãå ã®ã¡ã«ã»ã³ããã¤ã¹ã¿ã¨ç°ãªã£ã¦ãããhttps://t.co/Z5WJhHVyNdâ kusanoãã@ããã°ããªã (@kusano_k) February 17, 2016 ãã®å¾ãçæãããæ¬ä¼¼ä¹±æ°åãå¤ãã£ã¦ãã¾ãã®ã§ãå¾æ¹äºææ§ãå£ãå¤æ´ã¯è°è«ãã¦ããmergeãã¹ãã¨ãããã¨ã§revertããããã®åãã¼ã¸ããã
PHPã¯ããDISããããã¨ãããã¾ããããããå®éã«ã¯ã»ã¨ãã©PHPãå©ç¨ãã¦ããªã人ãå°è±¡ã ãã§DISã£ã¦ããã¨ãå¤ããããªæ°ããã¾ãã ããã§ãPHPãããDISããã¦ããç¹ã«ã¤ãã¦ãå®éã©ããªã®ããPHPæªä½é¨è åãã«è§£èª¬ãã¦ããããã¨æãã¾ããPHPã触ã£ããã¨ãªã人ã§ãããããããããã«ã·ã³ãã«ç®ãªä»æ§ã®Rubyãä¾ã«èª¬æãã¦ããããã¨æãã¾ãï¼( Ruby触ã£ããã¨ãªãã¦ãããã®ä»ã®OOPè¨èªã触ã£ããã¨ããã°é°å²æ°ã¯ç解ã§ããããã«æ¸ãã¦ãã¾ã ) DISä¾1 / PHPã¯é åæä½ããã¥ãã PHPã®é åæä½ã¯æ±ãã¥ããçã¨DISã人ãã¡ããã¾ããå®éã®ã¨ããã©ãã§ããããã 以ä¸ã®ãããªå¦çãé åã¸ã®ä¸éå¤æ°ãç¨ããè¡ãã³ã¼ããä¾ã«èãã¦ã¿ã¾ãã
ãã®è¨äºã¯PHPã¢ããã³ãã«ã¬ã³ãã¼2015ã®3æ¥ç®ã®è¨äºã§ã ã MBSD寺ç°ããã®è¨äºãLWSã¨HTTPãããã¤ã³ã¸ã§ã¯ã·ã§ã³ãã§ã¯ãPHPã®headeré¢æ°ã«é¢é£ãã¦ãPHPå´ã®HTTPãããã¤ã³ã¸ã§ã¯ã·ã§ã³å¯¾çãåé¿ããææ³ã¨ãããã«å¯¾ããPHPå´ã®å¯¾å¿ã«ã¤ãã¦æ¸ããã¦ãã¾ãããã®è¨äºã§ã¯ã寺ç°ããã®è¨äºãåãã¦ãç¾å¨ã§ãHTTPãããã¤ã³ã¸ã§ã¯ã·ã§ã³æ»æãå¯è½ãªPHPç°å¢ãæ®ã£ã¦ããããæ¤è¨¼ãã¾ãã HTTPãããã¤ã³ã¸ã§ã¯ã·ã§ã³ã¨ã¯ 以ä¸ã®æ§ãªã¹ã¯ãªãããããã¨ãã¾ãã <?php header('Location: ' . $_GET['url']); ãªã¼ãã³ãªãã¤ã¬ã¯ã¿èå¼±æ§ãããã¾ãããããã¯æ°ã«ããªãã¨ãã¦ãPHP5.1.1ã¾ã§ã®ãã¼ã¸ã§ã³ã§ã¯ã以ä¸ã®æ§ãªæ»æãå¯è½ã§ããã http://example.jp/header.php?url=http://example
2. ã¢ã¸ã§ã³ã ⢠SQLã¤ã³ã¸ã§ã¯ã·ã§ã³å¯¾çããã®è²¬ä»»ãéçºä¼ç¤¾ã« åãå¤æ±º ⢠PHPå ¥éæ¸ã®SQLã¤ã³ã¸ã§ã¯ã·ã§ã³èå¼±æ§ã®ç¶æ³ ⢠O/RããããSQLã¸ã§ãã¬ã¼ã¿ã¼ã®SQLã¤ã³ã¸ã§ã¯ ã·ã§ã³ã®è©±é¡ â Rails SQL Injection Examplesã®ç´¹ä» â Zend Frameworkã®SQLã¤ã³ã¸ã§ã¯ã·ã§ã³ â JSON SQL Injection â Drupageddon(CVE-2014-3704) Copyright © 2008-2015 HASH Consulting Corp. 2 3. 徳丸浩ã®èªå·±ç´¹ä» ⢠çµæ´ â 1985å¹´ 京ã»ã©æ ªå¼ä¼ç¤¾å ¥ç¤¾ â 1995å¹´ 京ã»ã©ã³ãã¥ãã±ã¼ã·ã§ã³ã·ã¹ãã æ ªå¼ä¼ç¤¾(KCCS)ã«åºåã»è»¢ç± â 2008å¹´ KCCSéè·ãHASHã³ã³ãµã«ãã£ã³ã°æ ªå¼ä¼ç¤¾è¨ç« ⢠çµé¨ããã㨠â 京ã»ã©å ¥ç¤¾å½æã¯CADãè¨ç®å¹¾ä½
å¼ç¤¾æ¬ç¤¾ã®éº»å¸åçªç§»è»¢ã«ä¼´ããæ¬ç¤¾è¿ãã®éº»å¸å³æ¸é¤¨ãå©ç¨ãã¦ãã¾ãã麻å¸å³æ¸é¤¨ã¯åå°æã®ã¤ã¡ã¼ã¸ã«ããçæ´ãªå»ºç©ã§ãèµæ¸ããªãå ´åã¯æ¸¯åºã®ä»ã®å³æ¸é¤¨ããåãå¯ãï¼ç¡æã§ãï¼ãã§ãã¾ãã®ã§ãããå©ç¨ãã¦ãã¾ããä»åã¯ãå±±ç°ç¥¥å¯ããã®ã10æ¥ã§ãã¼ããPHPå ¥éæ室 第4ç ããåãã¦èªãã§ã¿ã¾ãããä¸èªãã¦ãæ¬æ¸ãã»ãã¥ãªãã£ã«ãããé æ ®ããã¦ãããã¨ããããã¾ããã®ã§ã以ä¸ã«ãç´¹ä»ãããã¨æãã¾ãã ã¯ãã¹ãµã¤ãã¹ã¯ãªããã£ã³ã°(XSS) 表示ã®éã«HTMLã¨ã¹ã±ã¼ãããã¨ããååãå¿ å®ã«å®ã£ã¦ãã¾ãããã®ãããä¸è¨ã® e() ã¨ããé¢æ°ãå®ç¾©ãã¦å¼ã³åºãã¦ãã¾ãã function e($str, $charset = 'UTF-8') { return htmlspecialchars($str, ENT_QUOTES, $charset); } ãã®ä»ã«ãXSS対çã¨ãã¦éè¦ãªä¸è¨ã®
PHPã®basenameé¢æ°ã«ã¯ããã«ããã¤ãã«å¯¾å¿ãã¦ããªãã¨ãã誤解ï¼å®éã«ã¯ãã±ã¼ã«ã®è¨å®ãããã°ãã«ããã¤ãã§ã使ããï¼ããã£ãããä¸æ£ãªæåã¨ã³ã³ã¼ãã£ã³ã°ããã§ãã¯ããªãã¨ãã課é¡ããã£ããã§ãã¤ãã¤ãã ãªã¼ã¨æã£ã¦ããæ¹ãå¤ãã¨æãã¾ãã ããããæ¹ã ããpreg_replaceï¼u修飾åã¤ãï¼ãmb_ereg_replaceãç¨ãã¦ä»£æ¿é¢æ°ãä½æãã¦ãã解説ãè¦ããã¾ãããããã§ã¯ãããæ£è¦è¡¨ç¾é¢æ°ã¯ä¸æ£ãªæåã¨ã³ã³ã¼ãã£ã³ã°ããã§ãã¯ãã¦ããã®ã ãããã¨ããçåãçãã¾ãã ãã£ã¨èª¿ã¹ãã¨ããã以ä¸ã®æ§ãªç¶æ³ã®ããã§ãã preg_replace : ä¸æ£ãªæåã¨ã³ã³ã¼ãã£ã³ã°ããã§ãã¯ãã¦ãã mb_ereg_replcae : ä¸æ£ãªæåã¨ã³ã³ã¼ãã£ã³ã°ããã§ãã¯ãã¦ããªã ããã§ã¯ãmb_ereg_replaceãä¸æ£ãªæåã¨ã³ã³ã¼ãã£ã³ã°ããã§ãã¯ããªãç¶æ³ã¨ãã
5/3 17:45追è¨ï¼t_komuraããã«ææããã ããé¢æ°ã¨ãããã«åã調ã¹ç´ãããã®ãå«ããããã±ã¼ã«è¨å®ã«å¾ãé¢æ°ä¸è¦§ãã«25åã»ã©è¿½å ãã¾ãããããªãè¦è½ã¨ããããã¾ãããâ¦ã PHPã®ãã±ã¼ã«*1ã¾ããã«ã¤ãã¦èª¿æ»ããã®ã§ããããã¾ã¨ãã¦ã¿ã¾ãã ãã®è¨äºã¯ããã±ã¼ã«ã®å½±é¿ãåããé¢æ° - Sarabande.jpããæãä¸ãããã®ã§ããmasakielasticããããã¤ã¹ãªè¨äºããããã¨ããããã¾ãã PHPã®æåååã¨æåã¨ã³ã³ã¼ãã£ã³ã° ä»ã®ã¢ãã³ãªLLè¨èªã¨ç°ãªããPHPã¯æååã®æåã¨ã³ã³ã¼ãã£ã³ã°ã«é¢ãã¦ä½ãä»®å®ãããåãªããã¤ãåã¨ãã¦ç®¡çãã¦ãã¾ããã¤ã¾ããæåã¨ã³ã³ã¼ãã£ã³ã°ã®åãæ±ãã¯åé¢æ°ã®å®è£ ã«å§ãããã¦ãã¾ãã ä¸è¨ã®éããããã¯ããã¥ã¢ã«ã«ãè¨è¿°ãããã®ã§ãããå®ã«æ®å¿µãªãã¨ã§ãã æ®å¿µãªãããPHP ã®åé¢æ°ãæååã®ã¨ã³ã³ã¼ãã£ã³ã°ãå¤æãã
ã¾ãã¯ä»¥ä¸ã®ãµã³ãã«ãã覧ãã ããããµã¼ãã¼ã¯Windowsã§ãå é¨ã»å¤é¨ã®æåã¨ã³ã³ã¼ãã£ã³ã°ã¯UTF-8ã§ããUTF-8ã®ãã¡ã¤ã«åãå¤é¨ããåãåããWindowsãªã®ã§ãã¡ã¤ã«åãShift_JISã«å¤æãã¦ãã¡ã¤ã«ãèªã¿è¾¼ãã§ãã¾ããbasenameé¢æ°ãéããã¨ã«ããããã£ã¬ã¯ããªãã©ãã¼ãµã«å¯¾çãæ½ãã¦ãã¾ãã <?php header('Content-Type: text/plain; charset=UTF-8'); $file_utf8 = basename($_GET['file']); $file_sjis = mb_convert_encoding($file_utf8, 'cp932', 'UTF-8'); $path = './data/' . $file_sjis; var_dump($path); readfile($path); ãããããã£ã¬ã¯ããªã
GHOSTèå¼±æ§ã«ã¤ãã¦ãã³ã¼ãå®è¡ã®å½±é¿ãåããã½ããã¦ã§ã¢ã¨ãã¦Eximãç¥ããã¦ãã¾ãããPHPã«ãgethostbynameã¨ããé¢æ°ããããlibcã®gethostbynameé¢æ°ããã©ã¡ã¼ã¿æªãã§ãã¯ã®ã¾ã¾å¼ãã§ãã¾ããããã§ãPHPã®gethostbynameãç¨ãããã¨ã§PHPãã¯ã©ãã·ã¥ã§ããå ´åãããã®ã§ã¯ãªããã¨èãã¾ããã 試è¡é¯èª¤çã«èª¿ã¹ãçµæã以ä¸ã®ã¹ã¯ãªããã§PHPãã¯ã©ãã·ã¥ã§ãããã¨ã確èªãã¦ãã¾ããCentOS6(32bit/64bitã¨ã)ãUbuntu12.04LTS(32bit/64bitã¨ã)ã®ããã±ã¼ã¸ã¨ãã¦å°å ¥ããPHPã«ã¦ç¢ºèªãã¾ããããphpallã§ç¢ºèªããéãPHP 4.0.2以éã®ãã¹ã¦ã®ãã¼ã¸ã§ã³ã®PHPã§åç¾ããããã§ãããªããPHP 4.0.0ã¨4.0.1ã§ã¯åç¾ãã¾ããã§ããã <?php gethostbyname(str_
(Last Updated On: 2018å¹´8æ13æ¥)PHP7ãä»å¹´ã®ç§ãªãªã¼ã¹ãããäºå®ã§ããã¾ã ã¾ã å¤ãã®å¤æ´ãè¡ãããäºå®ã§ãããç¾ç¶ãç°¡åã«ã¾ã¨ãã¦ã¿ããã¨æãã¾ãã代表çãªç©ã®ã¿åãä¸ãã¦ãã¾ãã ãåç¥ãªãæ¹ã®çºã«æ¸ãã¦ããã¾ããç¾å¨ãªãªã¼ã¹ããã¦ããPHPã¯PHP5ã§ãã次ã®PHPã¯PHP7ã«ãªããPHP6ã¯ãªãªã¼ã¹ããã¾ãããPHP6ãUnicodeããã¤ãã£ãæååã¨ãã¦ãµãã¼ããããã¼ã¸ã§ã³ã¨ãã¦éçºããã¾ããããæåã¨ã³ã³ã¼ãã£ã³ã°ãã§ãã¯ãå é¨ã§èªåçã«è¡ããã¨ãããªã©ãç¡é§ãå¤ãé ãããç ´æ£ããã¾ãããï¼æåã¨ã³ã³ã¼ãã£ã³ã°ã®ããªãã¼ã·ã§ã³ã¯æ¬æ¥ã¢ããªã§ãããã®ã§ãï¼ãã®ãããPHP6ã¯ã¹ããããã次ã®PHPã¯PHP7ã«ãªãã¾ãã 追è¨ï¼PHP7.0ã¯æ¢ã«ãªãªã¼ã¹ããã¦ãã¾ããæ¦è¦ã¯PHP 7.0ã®æ¦è¦ã»æ°æ©è½ã»äºææ§ã詳ããã¯ãã¤ã°ã¬ã¼ã·ã§ã³ããã¥ã¡ã³ããã
ãã®è¨äºã¯PHPã¢ããã³ãã«ã¬ã³ãã¼2014ã®22æ¥ç®ã®è¨äºã§ã ã 2002å¹´3æã«å ¬éãããIPAã®äººæ°ã³ã³ãã³ããã»ãã¥ã¢ããã°ã©ãã³ã°è¬åº§ãã2007å¹´6æã«å¤§å¹ ã«æ´æ°ããã¾ãããããã¦ããã®ä¸ç¯ãPHPerãã¡ãæ¿ããåºæ¿ãããã¨ã«ãªãã¾ãã (1) ããã°ã©ãã³ã°è¨èªã®é¸æ 1) ä¾ãã°ãPHPãé¿ãã çææ¥ã§ç´ æ©ããµã¤ããç«ã¡ä¸ãããã¨ã®ã¿ã«çç®ããã®ã§ããã°ãPHPã¯æªãå¦çç³»ã§ã¯ãªããããããããã¾ã§å¤ãã®èå¼±æ§ãçãã§ããçµç·¯ããããæ¹åãé²ãã§ããã¨ã¯ããã¾ã ååå åºã¨ã¯è¨ããªãã ã»ãã¥ã¢ããã°ã©ãã³ã°è¬åº§ï¼ã¢ã¼ã«ã¤ãï¼ããå¼ç¨ ãPHPãé¿ãããã¨ã¾ã§è¨ããã¦ãã¾ã£ãããã§ãå½ç¶ãªãããããçéã§ã¯çä¸ãèµ·ãããç¾å¨ã¯ããå°ããã¤ã«ããªè¡¨ç¾ã«å¤ãã£ã¦ãã¾ã(åç §)ã æ¬ç¨¿ã§ã¯ãå½æã®PHPã®ç¶æ³ãæ¯ãè¿ãæ段ã¨ãã¦ããã®å¾PHPã®ã»ãã¥ãªãã£æ©è½ãã©ã®ããã«å¤å
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}