ãã¡ã¤ã«å ¥åºåã«ã¤ã㦠PHPã§ã¯ãã¼ã¿ã®ä¿åã«ãã¼ã¿ãã¼ã¹ãããå©ç¨ããã¾ããããã¡ããããã¹ããã¡ã¤ã«ã«ãã¼ã¿ãæ¸ãè¾¼ããã¨ãå¯è½ã§ãããã¡ã¤ã«ãæ±ãå½ä»¤ã¯ããã¤ãå®è£ ããã¦ããã®ã§ãããä¸ä¾ãç´¹ä»ãã¾ãã ãã¡ã¤ã«ãæ±ãã«ã¯ fopen é¢æ°ã§ãã¡ã¤ã«ãéãã¾ããå¼æ°ã«ãéããããã¡ã¤ã«ãã¨ãã¢ã¼ãããããããæå®ãã¾ãããã¡ã¤ã«ãéãã¨ãã¡ã¤ã«ãã¤ã³ã¿ã¨å¼ã°ããèå¥æåãè¿ããã以éã¯ãã®ãã¡ã¤ã«ãã¤ã³ã¿ãå©ç¨ãã¦ãã¡ã¤ã«ãæ±ãã¾ãã ã¾ããéãããã¡ã¤ã«ã¯ fclose é¢æ°ã§éãã¦ããã¾ãã $fp = fopen("éããããã¡ã¤ã«", "ã¢ã¼ã"); fclose($fp); ãã¡ã¤ã«ãèªã¿æ¸ãããå ·ä½çãªæ¹æ³ã¯ã以ä¸ã§ç´¹ä»ãã¾ãã ãã¡ã¤ã«ã®èªã¿è¾¼ã¿ fopen é¢æ°ã®ã¢ã¼ãã« r ãæå®ããã¨ãèªã¿è¾¼ã¿ã¢ã¼ãã§ãã¡ã¤ã«ãéãã¾ãã èªã¿è¾¼ã¿ã¢ã¼ãã§ãã¡ã¤ã«ãéãã¨ãfg
ãããªãPHPãªãã¿ã§ããã ããã·ã¥ã¢ããç³»ã®ãµã¼ãã¹ãä½ã£ã¦ããã¨ãæå®ãããURLã®ãã¼ã¸ã¿ã¤ãã«ãåå¾ãããæãé »ç¹ã«ããã¾ãããããªæãããããã¹ã¯ã¬ã¤ãã³ã°ãã¦ã¿ã¤ãã«ãæãåºããã§ãããè¿é ããããã§ã¾ãã£ã¦ããã¹ã¯ã¬ã¤ãã³ã°ãã¼ã«ãããã©ã¤ãã©ãªãã使ããªãã¦ããã¼ã¸ã¿ã¤ãã«ãããã¯æãåºãããã§ãç°¡åãªãµã³ãã«ãæ¸ãã¦ã¿ãã <?php /** * ãã¼ã¸ã¿ã¤ãã«ãåå¾ããé¢æ° */ function getPageTitle( $url ) { $html = file_get_contents($url); //(1) $html = mb_convert_encoding($html, mb_internal_encoding(), "auto" ); //(2) if ( preg_match( "/<title>(.*?)<\/title>/i", $html,
追è¨ã2013-09-07 twitterãã©ãCMS Laconica - è¶ ã¡ã¢å¸³ï¼Webå¼ï¼ ç¾å¨ããä»äºã§ã¯ä½æ¥ãã°ãã¨ããªããä»äºããã¦ããã®ã§ãããtwitterã¿ããã«èªåã§æéãã¨ããã便å©ã ããªã¨æã£ãã®ã§ããã ç¾ç¶ã®ä½æ¥ãã°ã¯é常ã®txtãã¡ã¤ã«ã«ãcharu3ã®ãã¯ãã使ã£ã¦æéã追å ããªããè¡ãchangelogå½¢å¼ã§è¡ã£ã¦ããã®ã§ããã emacsã§chengelogãä½ã£ã¦ããææãããã¾ããããvimã«ä½¿ãã¨ãã£ã¿ã¼ãå¤ãããä»ã®å½¢å¼ã«è½ã¡çãã¾ããã ãããæ稿ããã ãã§æéãèªåã§è¿½å ãã¦ããã¦ããªããã¤Webä¸ã®ã©ãããã§ãæ稿ã§ããå½¢å¼ã«ããã便å©ã ãªã¨ãããã®ã§ããã Webãµã¼ãã¹ã¨ãã¦ãªãã®ããªï¼ æ¡ã¨ãã¦ã¯twitterã«ãµãã¢ã«ã¦ã³ããä½ã£ã¦ããã©ã¤ãã¼ãã¢ã¼ãã§èªåä¸äººã ãã§æ稿ãããå½¢ã§ä½¿ãã£ã¦ãã¨ãèããã®ã§ããããããã«ãã©ã¤ãã·ã¼
ãã°ããå¤é©ãIT㧠ãã¸ã¿ã«ãã©ã³ã¹ãã©ã¼ã¡ã¼ã·ã§ã³ã®æ代ããã°ããå¤é©ãæ±ããããæ代ã«ãã¦ã¼ã¶ã¼ç®ç·ããã£ãã·ã¹ãã éçºã§ãã¿ãªãã¾ã®ãã¸ãã¹å¤é©ã«æ大éè²¢ç®ãã¾ãã å¤é©ãèµ·ããã«ã¯æéããããã¾ããã¾ãã¯å°ããå¤ãã¦ã¿ã¦å¹æã確èªããç¶ç¶ãããã¨ã§å¤§ããªå¤é©ãèµ·ããããããªããæ¹ããææ¡ã§ãã¾ãã å¤é©ãå§ãã¦ã¿ããããããªæã¯LINEARã«ãåãåãããã ãããã¿ãªãã¾ã«å®å¿ãã¦ä½¿ã£ã¦ããã ãããå®å ¨ã§é«å質ãªã¢ããªã±ã¼ã·ã§ã³ã»ã¦ã§ããµã¤ãéçºã§ãã¸ãã¹ã®å¤é©ã«è²¢ç®ãã¾ãã 01Agile Style ããã¥ã¡ã³ãããç¾ç©ä¸»ç¾© 延ã ã¨ç¶ãéå±ãªããã¥ã¡ã³ãã¬ãã¥ã¼ã¯ããã¾ãããã ç´ æ©ãã¢ãã¯ã¢ãããä½æããç¾ç©ã使ã£ã¦ãã¸ãã¹ã®å¤é©ãè°è«ãã¾ãããã éçºã¯ãã¹ã¦ãªã³ã©ã¤ã³ã§ãã¿ãªãã¾ã®è²´éãªæéãç¡é§ããå¹ççã«ãããã¾ãã 02Project Management å質ã¨
Windows OS ã« PHPã¨Apacheãµã¼ãã¼ã®ã¤ã³ã¹ãã¼ã« ï½ php.iniã®è¨å®ã¾ã§ã ãã½ã³ã³ã§PHPã使ããããã«ãªãã¾ã§ã®æé ãå³è§£ã .htaccessã®æå®æ¹æ³ã使ç¨é »åº¦ã®é«ãPHPé¢æ°ããµã³ãã«ä»ãã§è§£èª¬ã Tipsã§ã¯å®ç¨çãªèªä½é¢æ°ãç´¹ä»ã JavaScriptã®åºæ¬ï½å®ç¨çãªé¢æ°ã¾ã§ãµã³ãã«ä»ãã§è§£èª¬ã ãã¼ã«ãªã¼ãã¼ãã¦ã£ã³ãã¦æä½ãé£åãã«ãã¦ã³ãå ¥åãã§ãã¯ï¼æ£è¦è¡¨ç¾å«ãï¼ãªã©ã ãµã¤ãå¶ä½ã«ä½¿ããå®ç¨çãªã¹ã¯ãªãããç´¹ä»ãã³ããã§ä½¿ãã¾ãã JavaScriptã§DOMï¼Document Object Modelï¼ã®ã¡ã½ããã»ããããã£ã使ã£ã¦ãã¼ã¸ä¸ã®ãã¼ãã«ã¢ã¯ã»ã¹ãããµã³ãã«ã追å ãã¾ããã Ajax ããã°ããµã¤ãã§ä½¿ããå®ç¨çãªAjaxããµã³ãã«ä»ãã§è§£èª¬ã HTML5 次ä¸ä»£HTMLæ¨æºã¨ãªãHTML5ã使ã£ã¦ã¿ããï¼HTML5ã®ã¿ã°ãªã
ã¿ã¤ãã«ã®ãã¨ãç¥ãåãã«èããããã§ãããèªåãOAuthã«é¢ãã¦ã¯å°ãæªããã£ãã®ã§ãåå¼·ãã¦ãã½ã¼ã¹ãä½ãã¾ããã ããããWebã§ããã«è¦ã¤ããè³æã ã¨ãã¡ãã£ã¨æ å ±ã足ããªãã£ãããã¦å°ãã¾ãããããã ã²ã¨ã¾ãä½ã£ããã®ã§OAuthèªè¨¼ãAPIåä½ãªã©ã確èªããã®ã§ã以ä¸ã«æ å ±ãè¼ãã¾ãã OAuthèªè¨¼ã®æ¦ç¥ OAuthã®è©³ãã話ã¯ãããªãçç¥ãã¾ãããè¦ã¯ã¦ã¼ã¶ããç§ã¯ãã®ã¢ããªã±ã¼ã·ã§ã³ãä¿¡é ¼ãã¾ãããã¨ããã¡ãã»ã¼ã¸ãTwitterãªãã®ãµã¼ãã¹ã«éã£ã¦ãã¢ããªã±ã¼ã·ã§ã³ã¨ãµã¼ãã¹ã®éã§å¥½ãã«éä¿¡ã§ããããã«ããä»çµã¿ã§ãã ï¼ãªããOAuthã§ã¯ãµã¼ãã¹ã¨éä¿¡ããã¢ããªã±ã¼ã·ã§ã³ãã³ã³ã·ã¥ã¼ãã¨è¨ãããã§ãï¼ ããã§ãOAuthã§éä¿¡ãããã¨ããã¢ããªã±ã¼ã·ã§ã³ã¯ãéä¿¡ã®ããã®éµãå¿ è¦ã«ãªãã¾ããæä½éå¿ è¦ãªéµã¯ã次ã®2ã¤ã§ãã ã³ã³ã·ã¥ã¼ãã»ãã¼ ã¦ã¼ã¶ã®ã¢ã¯ã»ã¹ã»
PHPã§ä½ã£ãã²ã¼ã ãµã¤ãã§OAuthãå©ç¨ããã®ã§ã使ãæ¹ããµã³ãã«ãã¡ã¢ãã¦ããã¾ãã ãã®ãã¼ã¸ï¼SDN Projectï¼ãåèï¼ã¨ããããã®ã¾ã¾ï¼ã«ãã¦ãã¾ãã®ã§ããã¡ããè¦ã¦ã¿ã¦ãã ããã OAuthã以åæ¸ããOpenIDã¨åæ§ã«ä»çµã¿ãã®ãã®ã¯é£ããã®ã§ããããµã³ãã«ãè¦ãªããèªåãªãã«å¤ãã¦ããã°ãããã»ã©é£ãããªãã£ãããã¾ãã 大ã¾ããªæé ã¯ã以ä¸ã®éãã§ãã â Twitterã«ã¢ããªã±ã¼ã·ã§ã³ç»é²ããã â¡OAuthã®PHPããã¦ã³ãã¼ããã â¢èªåã§PHPãæ¸ã â£ãµã¼ãã«ã¢ãã Twitterã«ã¢ããªç»é² ã¾ããTwitterã«èªåã®ã¢ã«ã¦ã³ãã§ãã°ã¤ã³Twitterã®OAuthç³è«ã®ãµã¤ããããèªåã®ã¢ããªã±ã¼ã·ã§ã³åããµã¤ãã®ã¢ãã¬ã¹ãç»é²ãã¾ãã ã»Application Nameã¯ãèªåã®ãµã¼ãã¹ã®ååã§ããã¦ã¼ã¶ã¯èªè¨¼ããéã«ãã®ã¢ããªã±ã¼ã·ã§ã³åã確èª
I was watching The Last Dance, Michael Jordanâs Netflix documentary, last year when I returned to work from four-month-long paternity leave. It was a great show and brought back all of the joys I had when watching Chicago Bulls in the 90s. And it still got me to think till today, what if my engineering team were a sports team. Give this idea a shot. For an engineer in an IT company, you donât play
php+smartyã§åãã¦ããPCç¨ã®ãµã¤ããæºå¸¯ãµã¤ãã«å¤æãã¦ãã¾ãæ¹æ³ããç´¹ä»ã ããæ¹ã¯ç°¡åã ï¼ï¼ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ããIPãªã©ã§æºå¸¯ããã®ã¢ã¯ã»ã¹ãããã½ã³ã³ããã®ã¢ã¯ã»ã¹ããå¤å¥ããã ï¼ï¼æºå¸¯ããã®ã¢ã¯ã»ã¹ã ã£ãå ´åã¯smartyã®ãã³ãã¬ã¼ãé¢é£ãã£ã¬ã¯ããªãæºå¸¯ç¨ã®ãã³ãã¬ã¼ããå ¥ãããã£ã¬ã¯ããªã«åãæ¿ãã â»æºå¸¯ç¨ã®ãã³ãã¬ã¼ãã¯PCçã¨åãæåã³ã¼ãã«ãã¦ããã¦ãã ããã ï¼ï¼$smarty->displayãã¦ãã¨ãã§PCããã®ã¢ã¯ã»ã¹ã ã£ãå ´åã¯ãã®ã¾ã¾displayã§è¡¨ç¤ºãããã æºå¸¯ããã®ã¢ã¯ã»ã¹ã ã£ãå ´åã¯$smarty->fetchã§è¡¨ç¤ºçµæãå¤æ°ã«åå¾ãã mb_convert_encodingã使ã£ã¦æåã³ã¼ããSJISã«å¤æãã¦å¤æ°ã®å 容ãechoã§æ¸ãåºãã 以ä¸ã PCçã®ããã°ã©ã ãã»ã¨ãã©ããããã¨ãªãæºå¸¯ãµã¤ããããã§ã¤ããããã¾ãã
å¹³ç´ ãããPHPããï¼ãããæ顧ããã ããèª ã«ãããã¨ããããã¾ãã 2006å¹´ããéå¶ãã¦ã¾ããã¾ãããPHPããï¼ãã§ããããµã¼ãã¹ã®å©ç¨ç¶æ³ãéã¿ã¾ãã¦ã2018å¹´9æ25æ¥ï¼ç«ææ¥ï¼ããã¡ã¾ãã¦ãµã¼ãã¹ãçµäºããã¦ããã ããã¨ã«ãªãã¾ããã ãµã¼ãã¹çµäºã«ä¼´ãã¾ãã¦ã2018å¹´8æ28æ¥ï¼ç«ææ¥ï¼ãæã¡ã¾ãã¦ãæ°è¦ä¼å¡ç»é²ãªãã³ã«Q&Aæ²ç¤ºæ¿ã¸ã®æ°ããªè³ªåãåçã®æ稿ãåæ¢ããã¦ããã ãã¾ãã ãªãããç»é²ããã ããçæ§ã®å人æ å ±ã«ã¤ãã¾ãã¦ã¯ããµã¼ãã¹çµäºå¾ãå¼ç¤¾ã責任ããã£ã¦æ¶å»ãããã¾ãã ããã¾ã§å¤ãã®çæ§ã«ãå©ç¨ãããã ãã¾ãã¦ãèª ã«ãããã¨ããããã¾ããã ãµã¼ãã¹çµäºã«ä¼´ããçæ§ã«ã¯ãä¸ä¾¿ãããããããã¾ããã¨ãå¿ãããè©«ã³ç³ãä¸ãã¾ãã æ¬ä»¶ã«é¢ãããåãåããã¯ãã¡ããããé¡ããããã¾ãã
Table of Contents åºæ I. ã¯ããã« 1. Smarty ã¨ã¯? 2. ã¤ã³ã¹ãã¼ã« å¿ è¦æ¡ä»¶ åºæ¬çãªã¤ã³ã¹ãã¼ã« æ¡å¼µã»ããã¢ãã II. ãã³ãã¬ã¼ããã¶ã¤ãã®ããã® Smarty 3. åºæ¬æ§æ ã³ã¡ã³ã å¤æ° é¢æ° å±æ§ ããã«ã¯ã©ã¼ãå ã«åãè¾¼ã¾ããå¤æ° æ¼ç®å Smarty ã®æ§æ解æãåé¿ãã 4. å¤æ° PHP ããå²ãå½ã¦ãããå¤æ° é£æ³é å é åã®ã¤ã³ããã¯ã¹ ãªãã¸ã§ã¯ã è¨å®ãã¡ã¤ã«ããèªã¿è¾¼ã¾ããå¤æ° äºç´å¤æ° {$smarty} ãªã¯ã¨ã¹ãå¤æ° {$smarty.now} {$smarty.const} {$smarty.capture} {$smarty.config} {$smarty.section}ã{$smarty.foreach} {$smarty.template} {$smarty.version} {$smarty.lde
ãªãã¡ã¯ã¿ãªã³ã°ã¨ã¯ãã½ããã¦ã§ã¢ã®å¤å´ã®æåãå¤æ´ããã«ãä¸èº«ãå¤æ´ãããã¨ã§ãã ä¼æ¥åãã¢ããªã±ã¼ã·ã§ã³ã§ã¯ãä¿å®ãå質ã管çããæéè¦ãã¾ãã ãã£ã¦ãä»äººã«ãããã«ããããã°ã©ã ãåå©ç¨æ§ãæ¡å¼µæ§ã®ç¡ãããã°ã©ã ã¯æé©åããå¿ è¦ãããã¾ãã ãªãã¸ã§ã¯ãæåãå¦ç¿ããå ´åãé£ããçè«ãå ã«å¸åãããã¨ãã¦ãæ念ããå ´åãå¤ãã®ã§ããããªãã¡ã¯ã¿ãªã³ã°ãç解ãããã¨ã§ããªãã¸ã§ã¯ãæåã®ç価ãè¦ãã¦ãã¾ãã ï¼ï¼ã¡ã½ããåã®å¤æ´ ã¡ã½ããåã¯ãã®ã¡ã½ããã®æ©è½ãæ確ã«èª¬æã§ããªãã¨ããã¾ããã ã§ãªãã¨ããã®ã¡ã½ããã使ããã¦ããå ´é¢ã§ããã®ã¡ã½ãããä½ãè¡ã£ã¦ããã®ã ãããã«ãããä¿å®ç®¡çã®å¦¨ãã«ãªãã¾ãã <?php class Food { private $name; public function getFood() { return $this->name; } pu
PHPã§ã¯ãHTMLãã¼ã¸å ã«<?php ?>ã¿ã°ã§æ¬ãäºã«ãã£ã¦ã HTMLï¼ãã¶ã¤ã³é¨åï¼ã¨ããã°ã©ã ï¼ãã¸ãã¯é¨åï¼ãåä¸ãã¼ã¸ã«è¨è¿°ã§ãã¾ããããããåããã¡ã¤ã«å ã«ãã¶ã¤ã³é¨åã¨ãã¸ãã¯é¨åãè¨è¿°ããã¨ã¡ã³ããã³ã¹ãé常ã«å°é£ã¨ãªãã¾ããJava ã§ã JSP ã§åããããªåé¡ãçºçããJSP 2.0 ã§ã«ã¹ã¿ã ã¿ã°ã®å°å ¥ã«ãã ãã¸ãã¯é¨ãåé¢ãããã¨ãã§ããStruts ã¨ãããã¬ã¼ã ã¯ã¼ã¯ã¾ã§çã¾ãã¾ããã PHP ã§ã¯ãTemplate Engineãã¨ããæè¡ã«ãã£ã¦ãã¶ã¤ã³é¨åã¨ãã¸ãã¯é¨åãåé¢ããã¡ã³ããã³ã¹ãåä¸ããããã¨ãã§ããããã«ãªãã¾ããããã®ãã¨ã§ããã¶ã¤ãã¼ã¨ããã°ã©ãã¼ãåæã«ä½æ¥ãè¡ããããã«ããªãã¾ããããã® Template Engine ã¯ãããã»ã©ä½ãã®ã«é£ããã¯ããã¾ãããããããèªåã§åµã£ã¦èªåã§ã¡ã³ããã³ã¹ãã¦ããã®ã¯å¤§å¤ã¨ããã®ã§
ãªã©ã¨çç¥ãã¦æ¸ãã¾ãã echo 㨠print ã¯(ã»ã¼)åããã®ã§ããã echo ã®æ¹ãæåæ°ãå°ãªãã®ã§(ç¬)ãªã¹ã¹ã¡ã§ãã flushé¢æ°ã使ãã¨ãåºåãå³åº§ã«ãã©ã¦ã¶ã«è¡¨ç¤ºããããã¨ãã§ãã¾ãã é·ãå®è¡æéã®ãããå¦çã§ãéä¸çµéãé次表示ããããå ´åã¯ã flushãæ¯åå¼ã³åºãã¨è¯ãã§ãã (å®éã«ã¯ãflushã¨ob_flushã両æ¹å¼ã¶å¿ è¦ãããã¾ã) (ä¾) flushã使ã£ããµã³ãã«
rubyã¨phpã®åºæ¬çãªéãã®ç¬¬äºå¼¾ã§ãã å¤æ°ã¨ãã¼ã¿å(2) ã¯ã©ã¹ã¨ãã¼ã¿å rubyã¨phpã®ãã¼ã¿åã®èãæ¹ã¯å¤§ããéãã¾ãã ã©ã®ããã«æ¯è¼ããã®ãé ãæ©ã¾ããé ç®ã§ãã rubyã§ã¯ããã¼ã¿åã¯ãã¹ã¦ã¯ã©ã¹ã§ãã ä¸æ¹ãPHPã§ã¯ãintegerãstringãarrayãªã©ã®ããã¤ãããããã¼ã¿åã¯å°ç¨ã«ç¨æããã ã¯ã©ã¹ã¯ããããã¨åä¸é層ã«åå¨ãã¦ãã¾ãã ä»åã¯ãPHPã®ãã¼ã¿åã¨ããã«å¯¾å¿ããRubyã®ã¯ã©ã¹ãä¸è¦§åãã¦ã¿ã¾ããã Ruby(ã¯ã©ã¹) PHP(ãã¼ã¿å) ãã¼ãªã¢ã³
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}