IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
The PHP coder's top 10 mistakes and problems @ SourceRally.net PHP Community ãPHPããã°ã©ããããããã¡ãªãã¹ï¼´ï¼¯ï¼°ï¼ï¼ããã¨ããè¨äºããã£ãã®ã§ç´¹ä»ã PHPåå¿è ã ã¨ãããããã¹ãããããã¾ãããã¨ãããã¨ã§ä»å¹´ããPHPãã¯ããããã¨æã£ã¦ãã人ã«ã¯æ°ãã¤ãã¦ã»ãããªã¹ãã§ãã çã§ã¯ã¨ãªãåºåããªã echo ï¼_GET['username']; â echo htmlspecialchars(ï¼_GET['username'], ENT_QUOTES); ãããªãã¨ã¯ãã¹ãµã¤ãã¹ã¯ãªããã£ã³ã°ããã¾ãã SQLã¯ã¨ãªã«ï¼_GET,ï¼_POST,ï¼_REQUESTã®å¤ãç´æ¥å«ããªã ï¼sql = "select * from table where id=".ï¼_GET["id"]; â ï¼sql =
ã¿ãããªã¿ã¤ãã«ã®è¨äºã Digg çµç±ã§çºè¦ããã¼ãã·ã¼ã代ããã«ã¨æãè¶ è¨³ã*1 A Software Architect PHP æé©å ãã¹ããã©ã¯ãã£ã¹ï¼ 01. static ã«ã§ããã¡ã½ãã㯠static ã¨ãã¦å®£è¨ããããï¼4åéãï¼ 02. echo ã®æ¹ã print ããéãã 03. echo 'æ','å'; ï¼ã«ã³ãåºåãï¼ã®æ¹ãã'æ'.'å' ï¼ãããé£çµï¼ããéãã 04. ã«ã¼ãã®æ大å¤ã¯ãã«ã¼ããå ãã§ã¯ãªããåãã«ã»ãããã¦ãããã 05. 大ããé åã®ãããªå¤æ°ã¯ unset() ãã¦ã¡ã¢ãªã解æ¾ãããã 06. ãã¸ãã¯ã¡ã½ããï¼ä¾ï¼ __get, __set, __autoloadï¼ã¯ä½¿ç¨ãé¿ãããã 07. require_once ã¯ãã¤ã³ã¹ããªã®ã§ãã 08. include ã require ã§ãã¡ã¤ã«ã¯ãã«ãã¹ã§æå®ãããã 09
å æ¥Googleãã©ã¦ã¶ãGoogle Chromeãã®ãã¼ã¿çãå ¬éããã¾ãããéãéãã¨è¨ããã¦ããChromeã®JavaScriptã¨ã³ã¸ã³ãV8ããã©ã®ç¨åº¦éãã®ãããã³ããã¼ã¯ãã¹ãã§ãããã¦ã¿ã¾ããã ï¼ã°ã©ãã®ç¸¦è»¸ã¯Chromeã1ã¨ããã¨ãã®å®è¡æéã§ãï¼ ç°å¢ OS Windows XP SP2 CPU Pentium 4 3.33GHz Memory 1.49GB ãã©ã¦ã¶ ãã¼ã¸ã§ã³ Chrome 0.2.149.27 Firefox 3.0.1 Safari 3.1.2 çµæã®è©³ç´° Chrome Firefox Safari IEã¯ããã®ãã·ã³ã«IE6ããå ¥ã£ã¦ãªãã£ãã®ã§æ¯è¼ããã¯ããã¾ããããåèã¾ã§ã«ãChromeã¯IE6ã®ç´50åéãã¨ããçµæãåºã¾ããã çµè« ãã¯ãChromeã®V8ã¯ç¸å½éãã¿ããã§ãããæ£è¦è¡¨ç¾ãé ãã®ãããæ°ã«ãªãã¾ãããä»ã«é¢ãã¦
ããã«ã¡ã¯ãä½ã æ¨ã§ãã Webãã£ã¬ã¯ã¿ã¼ã«å¿ è¦ãªåºç¤ç¥èã£ã¦ä½ï¼ ã¨ããåé¡ãèããã«ããã£ã¦ãããã¸ããªãã®ãããªã¹ã¯ã¼ã«ã®ã«ãªãã¥ã©ã ãåèã«ãã¦ã¿ããã¨ã«ãã¾ãããã¾ãã¯ä¸è¨ã®ãªã³ã¯å ãã覧ãã ããã Webãã£ã¬ã¯ã¿ã¼å°æ»ï½ã¯ãªã¨ã¤ã¿ã¼ãºã¹ã¯ã¼ã«ãã¸ããª ç¶²ç¾ çã«ãããããã¨ãåå¼·ããã«ãªãã¥ã©ã ã«ãªã£ã¦ãã¾ãããã¡ãããããããã®åéã«ãããã¨ãã¹ãã¼ããç®æãå¿ è¦ã¯ãªãã®ã§ãããã¨ããããç¥ã£ã¦ããã¹ããã¨ã ãã§ãããªãããããããã¾ãã Webãã£ã¬ã¯ã¿ã¼ã®å ´åããã®ãã¨ããããç¥ã£ã¦ãããã¨ãããã¨ãã¨ã¦ãéè¦ã§ãã å人ã®æè¡ãåãããå ´é¢ã§ããã°ããã¡ãã£ã¨ç¥ã£ã¦ããã¨ããã®ã¯ãã¾ã£ããç¥ããªããã®ã¨åãæå³ã§ããããã¾ãããããããå°éã®ç°ãªãã¨ãã¹ãã¼ããã¡ãã¾ã¨ãã¦ããã¸ã§ã¯ããé²ããå ´é¢ã«ãªãã¨ããã¡ãã£ã¨ç¥ã£ã¦ãããã¨ã¨ãã¾ã£ããç¥ããªãããã¨ã®éã«ã¯å¤§ã
ååã¯ï¼é¨ä¸ãæã¤ãã¨ã§æ··ä¹±ãã¦ããåæ¬ã«ä¸å¸ã¨ãã¦ã©ãè¡åãã¦ããã¹ãããä¼ãã¾ãããããã¦ï¼ç§ã¯å½¼ã«âã¯ããã¦é¨ä¸ãæã¤äºº"ã¸ã®5ã¤ã®ã¢ããã¤ã¹ããããã¨ã«ããã®ã§ãã åæ¬ã¯ï¼ä¸å 社å¡ã§ããï¼é·ãé¨ä¸ãæããªãã£ãã®ã§ï¼èªåã®ãã¨ã ããèãã¦ããã°æ¸ã¿ã¾ããããããï¼ä»å¾ã¯ããã§ã¯æ¸ã¿ã¾ãããå½¼ã«ã¯ãã£ããé¨ä¸ã®é¢åãè¦ã¦ãããï¼çµç¹ããã¼ã¸ã¡ã³ãã身ã«ä»ãã¦ã»ããããã§ãã åæ¬ã«éããï¼å¤ãã®äººã¯é¨ä¸ãæã¤ã¨ããã¾ã§ã¨ã¯éã£ãè¦å´ããã¾ããèªåã ãã§ç²¾ä¸æ¯ãªã¨ããã«ï¼ç¥èãçµé¨ãå£ãé¨ä¸ã®é¢åãè¦ãªãã¦ã¯ãªããªãã®ã§ãããï¼ãã®å¤§å¤ãã¯èª°ã§ãç解ã§ããã¨ããã§ãããã ãããï¼çµç¹ã§åãåºãã¦ãã以ä¸ï¼é¨ä¸ã®æ¦ååã¯é¿ãã¦éããªãéã§ããã©ãããããªãã¦ã¯ãªããªãé¨ä¸ããã¼ã¸ã¡ã³ããªãï¼ãã£ããã¨ãããããæ¹ãã身ã«ä»ããããã®ã§ããã¾ãï¼ç§ã¯ãããåæ¬ã«æããªãã¦ã¯ãªããªãã¨æ
å ã®ä¼ç¤¾ãå人ãã¡ãè¦ã¦ããå¦è ãå¼è·å£«ãã¨ã³ã¸ãã¢ãªã©ã®ç¹æ®ãªä¸ç以å¤ã§ã¯ï¼å®ã¯ï¼ããããä¸çãåããªã®ã§ããï¼ãè¥ãæ¥ã«ãã£ã¨ãè³¢ãã£ãã¯ãã®ç·ãã¡ã¯ä»äºäººçã«ããããããã«ãã£ã¦ãã¾ããããã¨ãã£ã¦é ã®æªãé£ä¸ãåºä¸ãã¦ããã¨ãããã¨ã§ãããã¾ãããé ã®ããã§ã¯ã第äºéå£ãããã«ããé£ä¸ããã£ã¨ãæåãåãã¦ããããã§ãã ãã£ã¨åè¿ãªè©±ã§ãããç§ã¯ï½¢ãã©ã³ããã®å ±èè ã§ãã岡康éã«æ¯ã¹ã¦ï¼©ï¼±ã«ãã¦10ã¯ä¸ã ã¨æãã¾ãããåå ¥ã¯å½¼ã®ã»ãã10åã¯ããã§ããã(ã¯ãããããç¬ï¼ å¦æ ¡ã§æãã¦ããã¨ç§æåã«ããããåºä¼ãã¾ããå½¼ãã¯ããã°å¦æ¥ã¨ãªã¼ããå ¥ç¤¾ã¨ãªã¼ãã«ãç¸å½ç¨åº¦éãªãã¾ãã人ããããã人çã®ååãéããã¦ãã¾ãããããå½¼ãã®ä»å¾ã®é·ã人çè¡è·¯ãèããã¨ãèªãã®é ã®ããã¨ã©ã対å¦ããã®ããããããã大äºãªãããªæ°ããã¾ãã å½¼ãã¸ã®ã¨ã¼ã«ï¼ã¨èªæï¼ãããã¦æ¸ãã¾ãã ã¨ããã§
ç¾å¨æã注ç®ããã¦ããWebã¢ããªã±ã¼ã·ã§ã³ã»ãã¬ã¼ã ã¯ã¼ã¯Ruby on Railsããã®ä½è ã§ããDavid Heinemeier Hanssonæ°ï¼é称DHHæ°ï¼ãæ¥æ¬Rubyã«ã³ãã¡ã¬ã³ã¹2006ï¼é¢é£è¨äºï¼ã®ããã«æ¥æ¥ããããJavaãPHPã§ã¯æ¸ããªãã£ãç¾ããã³ã¼ããæ¸ããããã---Hanssonæ°ã¯Rubyãéçºè¨èªã¨ãã¦é¸ãã çç±ãããèªãï¼èãæã¯ITproç·¨é é«æ©ä¿¡é ¼ï¼ ---ãªãRubyãé¸ãã ã®ã§ããã 以åï¼JavaãPHPã§ã³ã¼ããæ¸ãã¦ãã¾ããããããï¼JavaãPHPã§ã¯ç¾ããï¼Beautifulï¼ã³ã¼ããæ¸ããã¨ãã§ããï¼ä¸æºãæãã¦ãã¾ããããããªæã«ï¼ãªãã¡ã¯ã¿ãªã³ã°ãªã©ã§ç¥ãããï¼é人ããã°ã©ãMartin Fowleræ°ãRubyãç´¹ä»ããè¨äºãèªã¿ï¼èªåã§ä½¿ã£ã¦ã¿ã¦ï¼Rubyã¯ç¾ããã³ã¼ããæ¸ããã¨ãã§ããï¼ããã°ã©ãããããã¼ã«ããè¨èªã
æªæ ã®ããã°ã©ãã¨ããè·æ¥ããã°ã©ãã®æªæ ã綴ãã å ¥éæ¸ãæ¸ããªãããã°ã©ãã³ã°ã®ããã®ç¥èãä¼ç¤¾ã®ç ä¿®ãæããªãã·ã¹ãã éçºæ¥çã®è£è©±ã¯ãæ°äººããã°ã©ãããããããããã°ã©ããç®æã人ãã¡ã¸ã®ã¡ãã»ã¼ã¸ã§ãããã ããã°ã©ãã³ã°ãè¡ãéã«ãæ¢åã®ã½ã¼ã¹ã³ã¼ããæµç¨ãããã¨ã¯å¤ããèªåãéå»ã«æ¸ããã³ã¼ããå¨å²ã®ä»²éãæã£ã¦ããã³ã¼ãããã«ããæ¸ç±ã«æ²è¼ããã¦ããã³ã¼ãããããã§æ¢ãã°ãææ°æè¡ããã¤ãã¼ãªæè¡ã®ãã®ã§ããä½ãããçºè¦ã§ãããã¨ã ããã Yahoo! ã Google ã®ãããªä¸è¬çãªæ¤ç´¢ã¨ã³ã¸ã³ã§ããé©åãªãã¼ã¯ã¼ããæå®ããã°ãã½ã¼ã¹ã³ã¼ããæ¤ç´¢ãããã¨ãã§ãããã³ã¼ãã«ããåºã¦ããæååï¼ä¾ãã°ãï¼£è¨èªãªããincludeãããvoidããªã©ï¼ãå«ãã¦æ¤ç´¢ããã°ããã ããã ããããä¸è¬ã®ãã¼ã¸æ¤ç´¢ã§ã¯ãã³ã¼ãã®è§£èª¬ãé¢é£æ å ±ãªã©ãè¦ã¤ããã®ã§ææ義ã ãããããä¸æ¹
ãã«ã®ã¼ã«è¡ã£ã å æ¥ããã«ã®ã¼ã«è¡ãã¾ããã ãã°ãªããã®çµµã¨ã«ã¼ãã³ã¹ã®çµµãè¦ãã®ãç®çã ãã¾ãæéããªããããªã¥ãã»ã«ã¨ã¢ã³ãã¯ã¼ããé§ã足æ°å³ã§å·¡ããã¨ã«ã ãã¥ã³ãã³ããè»ã§10æéè¿ããããããªãã§ãããªç¡è¶ããã¦ãã¾ã£ãã®ãã¨ãæãã¾ããããã¨ã¼ãããã®æ¹â¦
ãã³ãã¤ã¯8æ¥ã1987å¹´ã«ãé±åå°å¹´ã¸ã£ã³ãã(éè±ç¤¾)ã«æ²è¼ããã¦ä»¥æ¥ãå¤ãã®ãã¡ã³ãç²å¾ãã¦ãã漫ç»ãã¸ã§ã¸ã§ã®å¥å¦ãªåéºãã®ä½ä¸ããå³é¸ããã»ãªã100種é¡ãèªã¿å¥ã¨ãªã£ãç¾äººä¸é¦ã®ç¶ç·¨ããã¸ã§ã¸ã§ã®å¥å¦ãªç¾äººä¸é¦ ãã¥ã¼ã¨ããçºè¡¨ãããä¾¡æ ¼ã¯6,300å(éæã»ææ°æãå¥éå¿ è¦)ã ãã¸ã§ã¸ã§ã®å¥å¦ãªç¾äººä¸é¦ ãã¥ã¼ã¨ã åååã¯ãä»å¹´2æã«ã¤ã³ã¿ã¼ãããé販éå®ã§çºå£²ãã好è©ãåãããã¸ã§ã¸ã§ã®å¥å¦ãªç¾äººä¸é¦ãã®ç¶ç·¨ã§ããã¸ã§ã¸ã§ã®å¥å¦ãªåéºãã®ä¸ã§ãç¹ã«äººæ°ã®é«ãã¨ããã第4é¨ã第6é¨ã®ä½ä¸ããã»ãªããæç²ãã¦ãããããã±ã¼ã¸å 容ã¯ãèªã¿æãåãæãå100æã¨ã漫ç»ãã¸ã§ã¸ã§ã®å¥å¦ãªåéºãã®å¤§ãã¡ã³ã¨ãããç¬ãè¸äººã®ã±ã³ãã¼ã³ãã¤ã·ãèªã¿æãæè© ããéè³ç¨CD(ä¸ã®å¥ã»ä¸ã®å¥ãåé²)1æãååäºç´ç¹å ¸ã®ç«¶æç¨CD(ä¸ã®å¥ã®ã¿åé²)1æãããã(解説æ¸)1åãã»ããã«ãªã£ã¦
â»æ¬è¨äºã¯ã11/29ã13ï¼18ã«ææ°ã®è¿½è¨ã»ä¿®æ£ãå ¥ã£ã¦ãã¾ãã builderèªè ã®çãããããã«ã¡ã¯ã è·å ´ã§é£ã®ãã¹ã¯ã®å 輩ã«ãåã¯ä»å¹´ã®ã¯ãªã¹ãã¹ãä¸äººå¯ããTVãè¦ããã¨ã«ãªãããã§ããã¨è¨ã£ãããã俺ã¯ä¸äººã§ã¤ã«ããã¼ã·ã§ã³ãè¦ã«è¡ããã¨åããã¦ãã¾ã£ãå±±ç°äºã¦ã¦ãã§ãã ãã®å 輩ã«ã¯ä¸çåã¦ãªãã¨æãã¾ãã ãããªãã¨ã¯ãã¦ããã ä»åããããé»ææãæ¯ããå人ãµã¤ãã«ã¤ãã¦æ´æ°ããããã¨æã£ãã®ã§ãããæ¥ããå¥ã®ä¼ç»ãæãã¤ããã®ã§ãã£ã¡ãæ¸ããã¨ã«ãã¾ããã é¡ãã¦ã ã§ãã ããããæååãã£ã¦ä½ãï¼ãã¨ããæ¹ã®ããã«ã¡ããã£ã¨èª¬æããã¨ãåºå¤§ãªãããä¸çã«ã¯æ°å¤ãã®æååãããããå®å®ã®æã ã®ãã¨ãç¹å¨ãã¦ããããããããç¬èªã®ã«ã«ãã£ã¼ãã³ãã¥ããã£ãç¯ãã¦çºå±ãã¦ãã¾ãã ãã¨ãã°mixiã2chããã³ãã³åç»ãªã©â¦â¦ã ãããã£ãããããã«å¤§ããªå½±é¿ãä¸ãã¦
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}