2017/10/08 PHPã«ã³ãã¡ã¬ã³ã¹2017
2017/10/08 PHPã«ã³ãã¡ã¬ã³ã¹2017
Updated 2015.12.07 / Published 2015.04.04 Firefox OSãWindows Phoneã®ç»å ´ã§ã¦ã¼ã¶ã¨ã¼ã¸ã§ã³ãæ å ±ã«ä¾åãã¦å¦çãè¡ã£ã¦ããé¨åãç¸æ¬¡ãã§è¦ç´ããè¿«ããããã¨ã«ãªãã¾ãã®ã§ã2015å¹´çJavaScriptã¦ã¼ã¶ã¨ã¼ã¸ã§ã³ãå¤å¥ã»å¤å®ã¨å趣æ¨ã§PHPã«ã¦ã¹ãã¼ããã©ã³ã»ã¿ãã¬ããã¾ããã®ã¦ã¼ã¶ã¨ã¼ã¸ã§ã³ããå¤å¥ã»å¤å®ãã¦åå²å¦çãè¡ãæé ããç´¹ä»ãã¾ãã <?php class UserAgent{ private $ua; private $device; public function set(){ $this->ua = mb_strtolower($_SERVER['HTTP_USER_AGENT']); if(strpos($this->ua,'iphone') !== false){ $this->device =
2. ãªã GC ã®è©±ãï¼ è¨èªå¦çç³»ã®å®è£ ãç¥ãã®ã¯è¯ãåå¼·ã«ãªã GC ã¯ã¨ã¦ãé¢ç½ã ⦠巧å¦ãªã¢ã«ã´ãªãºã ⦠é«éåã®ããã®å®è£ ä¸ã® (ä½æ°´æºãª) 工夫 両æ¹ã¾ã¨ãã¦æ¥½ããããããããæ¬ç©ã®ãã³ã¼ã㧠2015/02/27 第87å PHP åå¼·ä¼ 2 3. ãªã GC ã®è©±ãï¼ è¨èªå¦çç³»ã®å®è£ ãç¥ãã®ã¯è¯ãåå¼·ã«ãªã GC ã¯ã¨ã¦ãé¢ç½ã ⦠巧å¦ãªã¢ã«ã´ãªãºã ⦠é«éåã®ããã®å®è£ ä¸ã® (ä½æ°´æºãª) 工夫 両æ¹ã¾ã¨ãã¦æ¥½ããããããããæ¬ç©ã®ãã³ã¼ã㧠ä»æ¥ã¯ãã¡ãã®è©±ãä¸å¿ã«ã»ã»ã» 2015/02/27 第87å PHP åå¼·ä¼ 3 4. èªå·±ç´¹ä» å å±± éå¸ â¦ æ ªå¼ä¼ç¤¾ãã³ã©ã ⦠@y__uti ⦠http://y-uti.hatenablog.jp 好ããªè©±é¡ ⦠æ©æ¢°å¦ç¿ã¨ãã®å¨è¾ºåéï¼ã»ã¼ä»äºï¼ ⦠楽ããããã©æ°å¦ã¯ä¸çé¢ç®ã ã£ãã®ã§è²ã ã¤ãã ⦠ãã
ããããããè¨äºã®ã¿ã¤ãã«ãè¦ããã©ãRuby on Rails(以ä¸ãRails)ãåã¡ã ã¨ããPHPã®ã»ããåªãã¦ãã ã¨ããæã£ãæ¹ã¯ãã¾ããåçããã¹ãã ãã®è¨äºã¯ãRuby on Rails Advent Calendar 2014 â Qiitaã®1æ¥ç®ã®è¨äºã§ãã ãããããã®ã«ã¯ãã¤ããã©ãããããã®ãã ä¾ãã°ããã¼ã¸ã«åç´ãªã«ã¦ã³ã¿ãåãè¾¼ãã ãã«Railsã使ãã§ãããããä»ã®HTMLã«ããåãè¾¼ããã¨ãã§ããPHPã®ã»ãããã£ã½ã©ä¾¿å©ã§æ¥½ã§ããããç©äºã«ã¯é©æé©æã¨ããè¨èãããéããåæ§ã ã¨æãã¾ãã ããã§ã¯ãRailsã®é åã¨ãPHPã¨ãªãããã¾ã§æ¯ã¹ãããããæ¸ãã¦ã¿ã¾ãã ï¼ããã§ãã¬ã¼ã ã¯ã¼ã¯ã¨è¨èªãæ¯è¼ãã¦ããçç±ã¯å¾è¿°ã§ããä¸éçã«ããæ¯è¼ãããäºãå¤ããããï¼ ãã¾ã誰ãã£ã¦è¨ãããåã«ãèªå·±ç´¹ä»ããã¦ããã¨èªç§°ãITç³»ãªãã§ãå±ããããRails
2014/10/11 ã«éå¬ããã PHPã«ã³ãã¡ã¬ã³ã¹ ã«ã¦ããAnsibleã§ã¯ããããµã¼ãä½æ¥ã®èªååãã¨ããçºè¡¨ãè¡ã£ã¦ãã¾ããã ååä¸ã®ã»ãã·ã§ã³ã ã£ãã®ã§ãããå¤ãã®æ¹ã«ãåå é ãããããã¨ããããã¾ããã çºè¡¨è³æ çºè¡¨è³æãslideshareã«å ¬éãã¾ããã ä»åã¯ãããããAnsibleã使ã£ã¦ã¿ããã¨ããæ¹ã対象ã¨ãã¦ãAnsibleã®åºæ¬çãªå 容ãã¡ã¤ã³ã«ãã¾ãããã¾ããå®éã«ç§èªèº«ãPHPããã¸ã§ã¯ãã§æ¡ç¨ããéã®ã¦ã¼ã¹ã±ã¼ã¹ãç´¹ä»ãã¦ãã¾ãã çºè¡¨å¾ããAnsibleããã£ã¦ã¿ã¾ãï¼ãã¨ããæè¦ãé ããã®ã§ããã®ã»ãã·ã§ã³ã®ç®çã¯éæãããã¨ãã§ãã¾ãã:D ãã®ã»ãã·ã§ã³ã®ãã£ã¼ãããã¯ã¯ãjoind.in ã«ã¦åãã¦ä»ãã¦ãã¾ãããã§ã«ããã¤ã好è©ä¾¡ãé ãã¦ãã¦å®å¿ãã¦ãã¾ãããããè¯ãã£ãããé¡ããã¾ãã https://joind.in/talk/vi
Blog 201409 Linuxã®ã¿ã¼ããã«ã³ã³ã½ã¼ã«ï¼CUIï¼ä¸ã§YoutubeãTwitterãFacebookãå©ç¨ããæ¹æ³ ä»åã¯ãLinuxã®ã³ã³ã½ã¼ã«ã®ã¿ã§Webãµã¼ãã¹ã«ã¢ã¯ã»ã¹ã楽ããæ¹æ³ã«ã¤ãã¦ãã¾ã¨ãã¦ã¿ãã ã¤ã¾ããTeratermã§SSHæ¥ç¶ãã¦ãããµã¼ãä¸ãX Windows ã·ã¹ãã ãã¤ã³ã¹ãã¼ã«ãã¦ããªããã·ã³ä¸ã§Webãµã¼ãã¹ã使ãäºãåºæ¥ãã¨ãããã¨ã ã â¦ã¾ããä¸é¨ã»ããã¢ããæã«GUIã®ãã·ã³ãå¿ è¦ã«ãªããã ãã©ãããã¯ãææ¬ã¨ãããã¨ã§ 1.ã³ã³ã½ã¼ã«ä¸ã§Webãã¼ã¸ãé²è¦§ãã ã³ã³ã½ã¼ã«ä¸ã§Googleæ¤ç´¢ããã¥ã¼ã¹ãããã°ã®é²è¦§ãè¡ãã«ã¯ãã³ã³ã½ã¼ã«ä¸ã§ä½¿ããWebãã©ã¦ã¶ãLynxããç¨ããäºã§é²è¦§åºæ¥ãã Lynxãã¤ã³ã¹ãã¼ã«ããã«ã¯ã以ä¸ã®ã³ãã³ããã³ã³ã½ã¼ã«ä¸ã§å®è¡ããã sudo apt-get install lynx (Debi
ããã«ã¡ã¯ã岡æ¬ã§ãã å é±ã¯ç¬¬ä¸åç®ã®ã¢ã·ã¢ã«å¡¾ãéå¬ãããã¾ããã ååã«ãããããã大å¢ã®æ¹ã«ãåå ããã ããé常ã«æ¥½ããææ¥ãè¡ããã¨åºæ¥ã¾ããã ã¾ãããã°ã«è¨äºãæ¸ãã¦ãã ãã£ãæ¹ããããå é±ã¯è¬å¸«å¥å©ã«å°½ãã1é±éã§ããã ãPHPãªãã¸ã§ã¯ãæååå ¥éã 第1å ã¯ã©ã¹ã¨ãªãã¸ã§ã¯ã @Co-Edo ã«åå ãã¦ãã¾ããã ãã¦ç¬¬ä¸åã«åå ã§ããªãã£ãæ¹ã®ããã«è¬ç¾©ã®è³æãå ¬éãããã¨æãã¾ãã â»å½é¢ãã¢ã·ã¢ã«å¡¾ã§ã¯è³æãæééå®ã§å ¬éãã¦ããã¾ãã ã¾ããè¬ç¾©åç»ã«é¢ãã¾ãã¦ãå å·¥ãçµãã次第ãä¸é¨å ¬éãèãã¦ããã¾ãã ä»é±ã¯Linuxè¶ å ¥éç·¨ãéè¬ãããã¾ãã æ©æãå¤éã»ä¼æ¥ã大宮ã§ã®åºå¼µéå¬ãããã¾ãã®ã§ã ä»ã¾ã§é»ãç»é¢ãæ¬é ãã¦ãããã¶ã¤ãã¼ã®æ¹ã ãã³ããã°ã©ãã¼ã®æ¹ã«ããã²åå ãã¦é ããã°ã¨èãã¦ããã¾ãã ã¾ãããªãã¸ã§ã¯ãæååå ¥éç·¨ã®ç¬¬äºåã¯æ¥é±éå¬
6. JSON Schema ⢠JSONã®æ§é ãããªãã¼ã·ã§ã³ããããã®ä»æ§ ⢠http://json-schema.org/ ⢠http://json-schema.org/latest/json-schemacore.html 9. JSON Schema { integer âidâ: 12345, ânameâ: âHiraku NAKANOâ, âtagsâ: [âPHPâ,âJavaScriptâ] } id, name, tags ã¨ãã ããããã£ãæã£ã ãªãã¸ã§ã¯ã { string string[] âtypeâ:âobjectâ, âpropertiesâ: { âidâ: {âtypeâ:âintegerâ}, ânameâ: {âtypeâ:âstringâ}, âtagsâ: { âtypeâ:âarrayâ, âitemsâ:{âtypeâ:âstri
Gruntã§å§ããWebå¶ä½ã®èªåå Grunt.jsã¨ã¯Webå¶ä½ã®æ§ã ãªã¿ã¹ã¯ãèªååãã¦ããããã¼ã«ã§ãã node.jsã§éçºããã¦ãããSass/CompassãLessãªã©ã®CSSããªããã»ããµã¼ã®ã³ã³ãã¤ã«ãCSS/JSã®çµåå§ç¸®ãJSHintã«ããããªãã¼ã·ã§ã³ãªã©æ§ã ãªã¿ã¹ã¯ãèªåã§è¡ã£ã¦ããã¾ãã ã¤ã³ã¹ãã¼ã« ã¾ãã¯node.jsãã¤ã³ã¹ãã¼ã«ãã¾ããå ¬å¼ãµã¤ãã§ã¤ã³ã¹ãã¼ã©ã¼ãé å¸ããã¦ãã¾ãã®ã§ç°¡åã«ã¤ã³ã¹ãã¼ã«ãå¯è½ã§ãã 次ã«Macã§ã¯ã¿ã¼ããã«ãéãã¦grunt-cliãã¤ã³ã¹ãã¼ã«ãã¾ããããcliã¨ã¯Common Language Infrastructureã®ç¥ã§ã³ãã³ãã©ã¤ã³ããGruntãå©ç¨ããããã®ãã¼ã«ã§ãã sudo npm install -g grunt-cli ãã¹ã¯ã¼ããèãããã®ã§å ¥åãã¦ãã ãããæåããã°grunt-cliã®ã¤
å æ¥ã®ã¨ã³ããªããéå ±ãPHP-5.5.2ã«ã¦å¤§å£ããã®strict sessionsãå®è£ ããã¾ãããã«ã¦ãPHP5.5.2ã§ã»ãã·ã§ã³ã¢ããã·ã§ã³ã解æ¶ããããã¨ãå ±åãã¾ããï¼session.use_strict_mode=1ã®å ´åï¼ã ã»ãã·ã§ã³ã¢ããã·ã§ã³ã¨ã¯ãæªåæåã®ã»ãã·ã§ã³IDï¼ãã¨ãã°PHPSESSID=ABCï¼ãPHPãåãå ¥ããåé¡ã®ãã¨ã§ããstrict sessionsã使ç¨ããã¨ãPHPãçæããç¾å¨æå¹ã§ããã»ãã·ã§ã³IDã®ã¿ãåãå ¥ããããã§ãªãå ´åãPHPã¯ã»ãã·ã§ã³IDãæ¯ãç´ãã¾ãã ããã«ãPHP5.5.2ï¼PHP5.5.3ãï¼ã«ã¯ãã°ããããsession.use_strict_mode=1ã«ããstrict sessionsã¯ä½¿ç¨ã§ãã¾ããããæ¢ã«å¤§å£ããèªèº«ã«ãããã°ä¿®æ£ããã¦ããã®ã§ãPHP5.5.4ããã¯ä½¿ããããã«ãªãã§ãããã str
Laravelããã¥ã¡ã³ã åãã« Laravelã楽ãããã®ã¯èª°ï¼ Laravelã¯ã©ããéãã®ï¼ ã¢ããªã±ã¼ã·ã§ã³æ§é Laravelã®ã³ãã¥ããã£ã¼ ã©ã¤ã»ã³ã¹æ å ± åãã« Laravelã®ããã¥ã¡ã³ãã¸ããããã ãã®ããã¥ã¡ã³ãã¯ã¹ã¿ã¼ãã¬ã¤ãã¨ãã¦ãããã«ç¹å¾´ã®ç´¹ä»ã¨ãã¦ãå½¹ç«ã¤ããã«æ¸ããã¦ãã¾ãã ã©ãããèªãã§ãå¦ç¿ã§ãã¾ããã以åã«å¦ãã æ¦å¿µããã¨ã«ããã®å¾ã«ç¶ãããã¥ã¡ã³ãã¯æ¸ããã¦ãã¾ãã®ã§ãåãããé çªã«èªããã¨ããå§ããã¾ãã Laravelã楽ãããã®ã¯èª°ï¼ Laravelã¯æè»æ§ã¨èªã¿æ¸ããããããéè¦ããããã¯ãã«ãªãã¬ã¼ã ã¯ã¼ã¯ã§ãã åãã¦Laravelã«è§¦ããæ¹ã¯ã人æ°ããã軽éãªPHPãã¬ã¼ã ã¯ã¼ã¯ã使ç¨ãã¦éçºããæã¨åããå®ãããæããã§ãããã ããã¡ãã£ã¨çµé¨ãç©ãã ã¦ã¼ã¶ã¼ã§ããã°ãä»ã®ãã¬ã¼ã ã¯ã¼ã¯ã§ã¯ã§ããªãæ¹æ³ã§ãã³ã¼ããã¢ã¸ã¥ã¼ã«
ãã®ã¨ã³ããªã§ã¯ãhashdos対çã¨ãã¦ã®mod_securityã®å°å ¥ã¨è¨å®ã®æ¹æ³ã説æãã¾ããCentOSç°å¢ã§yumã«ããApacheãå°å ¥ãã¦ãããµã¤ãã«å¯¾ãã¦ãyumã«ããmod_securityãå°å ¥ããã¨ããã·ããªãªã§èª¬æãã¾ãã ã¯ããã«æ¢ã«å½ããã°ã§å ±åã®éããhashdosã¨å¼ã°ããæ»æææ³ãå ¬è¡¨ããã¦ãã¾ããHTTPãªã¯ã¨ã¹ãã®ãã©ã¡ã¼ã¿åã«å¯¾ããããã·ã¥å¤ãæ æã«åä¸ã«ãã(è¡çªããã)ãã®ãå¤æ°ï¼æ°ä¸ç¨åº¦ï¼éä¿¡ãããã¨ã«ãããWebãµã¼ãã¼ãæ°åç¨åº¦éè² è·ã«ã§ããã¨ããDoSæ»æææ³ã§ããã¾ã hashdosã«ããæ»æäºä¾ã¯å ±åããã¦ããªãããã§ãããæ¢ã«æ»æã³ã¼ãï¼PoCï¼ãå ¬è¡¨ããã¦ããããããã¤æ»æãèµ·ãã£ã¦ãä¸æè°ã§ã¯ãªãç¶æ³ã§ãã PHPãå½±é¿ãåãããã©ãããã©ã¼ã ã§ãããPHP5.3.9ã§å¯¾å¦äºå®ã¨ãªã£ã¦ãã¾ãããã¾ã PHP5.3.9ã¯ãªãªã¼ã¹ããã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}