ãããã¤ã³ã¹ãã¼ã«ä»£è¡¨ã®ã©ã¤ãããã¯ããã°
ãããªã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,
October 2, 2008 â 2:42 pm PHPï¼ã§ã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ãã¦ã§ããµã¼ãã¹ã®éçºãããéãZend Framework(ZF)ãå½¹ã«ç«ã¤ãå¼·ãæ¨å¥¨ãããã¨ã®è©±ãèãã(Google Web Serviceã®You-tubeä¸ã®ãã¢ã ã£ãã¨æãï¼ãæ©éãæããµã¼ãã«ãããããã¤ã³ã¹ãã¼ã«ãããã¨ã«ããããã¥ã¢ã«(ããã°ã©ãåããªãã¡ã¬ã³ã¹ã¬ã¤ãï¼ãèªãã§è¦ãã¨ããã®ãï¼ï¼ï¼ãã¤ã³ã¹ãã¼ã«ãã®åé ã«ã Zend Frameworkã¯PHP 5.1.4以éã§ãªãã¨åä½ãã¾ãããããããZendã¨ãã¦ã¯5.2.3以éã使ããã¨ãå¼·ãæ¨å¥¨ãã¾ããã¨ããã®ãã5.2.3ããåã®ãã¼ã¸ã§ã³ã¨æ¯ã¹ã¦å®å ¨æ§ãããã©ã¼ãã³ã¹ãåçã«åä¸ãã¦ããããã§ãã ã¨è¨è¿°ããã¦ããããããåãã¦ãæããµã¼ããPHPãã¼ã¸ã§ã³ãææ°ã®å®å®ç5.2.6ã«ã¢ããã°ã¬ã¼ããããã¨ã«ããªããã°ãã¨ä½æ¥ã
centos5.3ã«phpmyadminãå ¥ãããã¨ããããwithout-mysqlã§ãã«ããããphpããã±ã¼ã¸ã§åããªãã£ããããã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ãããã¨ã«ããã php5.2.10ã®ã¤ã³ã¹ãã¼ã« yumã§å ¥ããphpãåé¤ $ tar zxf php-5.2.10.tar.gz $ cd php-5.2.10 $ ./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --build=i686-redhat-linux-gnu --target=i386-redhat-linux --cache-file=../config.cache --datadir=/usr/share --host=i686-redhat-linux-gnu --includedir=/usr/include
phpãã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ããã¨ãã®make㧠collect2: ld returned 1 exit status make: *** [sapi/cli/php] ã¨ã©ã¼ 1 ã¨ããã¨ã©ã¼ãåºã¦ãããªãã°ã°ã£ã¦ãç®çã®æ å ±ã«ãã©ãçããªãã£ãã®ã§ã ã¡ã¢ãã¦ããã¾ãã ld.so.confãã¡ã¤ã«ãä¿®æ£ #vim /etc/ld.so.conf include /usr/local/lib/*ãè¿½è¨ ä¿®æ£ãã¡ã¤ã«ãåæ # /sbin/ldconfigããå®è¡ phpã®ã³ã³ãã¤ã«æã«ããªãã·ã§ã³ã追å --with-iconv=/usr/local ããã§makeãéããã¤ã³ã¹ãã¼ã«ã§ãã¾ãã ã¡ãªã¿ã« OSã¯CentOS5.2 phpã¯5.2.6 apacheã¯2.2.9ã§ãã
æºå Apacheã®ã³ã³ãã¤ã« ã¢ã¸ã¥ã¼ã«çã®PHPãçµã¿è¾¼ããããã«Apacheãã³ã³ãã¤ã«ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã [root]# ./configure --enable-modules="so ssl rewrite" [root]# make [root]# make install 以ä¸ã§Apacheã/usr/local/apache2ã«ã¤ã³ã¹ãã¼ã«ããã¾ããã ã©ã¤ãã©ãªã®ç¢ºèª ã°ã©ãã£ãã¯é¢é£ã®ã©ã¤ãã©ãªï¼ããªã¤ã³ã¹ãã¼ã«ããã¦ãããã®ï¼ gd-2.0.33-9.4.el5_1.1 gd-devel-2.0.33-9.4.el5_1.1 libpng-1.2.10-7.1.el5_0.1 libpng-devel-1.2.10-7.1.el5_0.1 libjpeg-devel-6b-37 libjpeg-6b-37 freetype-devel-2.2.1-20.el
WEBã§ã¬ã³ããã£ã¼ãã使ããPHPã®é²æ管çã½ãããPhpCollabã http://sourceforge.net/project/showfiles.php?group_id=46510 DLå ãphpcollab-2.5 rc 3 ãæ¥æ¬èªã«å¯¾å¿ãã¦ãããã¡ã¼ã«ã¨ã¬ã³ããã£ã¼ãã®æååã対çããã¾ããããæ«æ http://journal.mycom.co.jp/column/yetanother/061/ãæååã対çã¯ããããããã http://sourceforge.jp/projects/phpcollab24jaããã§2.4æ¥æ¬èªå¯¾å¿çãè½ã¨ã mtxc1kp.ttcã¨ãããã¡ã¤ã«ããªãã¿ããã ãæ¢ããâ http://www.motoya.co.jp/ (ã¦ã¼ã¶ç»é²ãå¿ è¦ã§ãã) ããã§é©å½ãªãã©ã³ããè½ã¨ãã¦ååããmtxc1kp.ttcãã«å¤ã㦠phpcoll
htmlã¿ã°ã®ãã«ãã¦ã³ã¡ãã¥ã¼ãç°¡åã«ä½æãã¾ãã ç¹ã«å¹´ææ¥ãå ¥ããã¨ãã«å½¹ã«ç«ã¡ã¾ãã å¹´ æ æ¥ ãã£ã¨ç°¡åã«è¨è¿°ãã¦ã¿ã¾ãããé¢æ°ãä½ã£ã¦ããã°ãã£ã¨æ¥½ï¼ä¸è¨ã¯ä¸è¨ã¨åãç©ã§ãã å¹´ æ æ¥ {$i}"; } } ?> å¼æ°ãå¢ããã¦åæé¸æå¤ãä»ãå ãã¾ããã3çªç®ã®å¤ãåæå¤ã§ãã å¹´ æ æ¥ {$i}"; }else{ echo "{$i}"; } } } ?> ããã«$startå¤ãåæ°å¢ããã¦ããæ¹æ³ã§ãã2ã ã£ãã2,4,6,8,10,12,14â¦. {$i}"; }else{ echo "{$i}"; } } } } ?>
å¹³ç´ ãããPHPããï¼ãããæ顧ããã ããèª ã«ãããã¨ããããã¾ãã 2006å¹´ããéå¶ãã¦ã¾ããã¾ãããPHPããï¼ãã§ããããµã¼ãã¹ã®å©ç¨ç¶æ³ãéã¿ã¾ãã¦ã2018å¹´9æ25æ¥ï¼ç«ææ¥ï¼ããã¡ã¾ãã¦ãµã¼ãã¹ãçµäºããã¦ããã ããã¨ã«ãªãã¾ããã ãµã¼ãã¹çµäºã«ä¼´ãã¾ãã¦ã2018å¹´8æ28æ¥ï¼ç«ææ¥ï¼ãæã¡ã¾ãã¦ãæ°è¦ä¼å¡ç»é²ãªãã³ã«Q&Aæ²ç¤ºæ¿ã¸ã®æ°ããªè³ªåãåçã®æ稿ãåæ¢ããã¦ããã ãã¾ãã ãªãããç»é²ããã ããçæ§ã®å人æ å ±ã«ã¤ãã¾ãã¦ã¯ããµã¼ãã¹çµäºå¾ãå¼ç¤¾ã責任ããã£ã¦æ¶å»ãããã¾ãã ããã¾ã§å¤ãã®çæ§ã«ãå©ç¨ãããã ãã¾ãã¦ãèª ã«ãããã¨ããããã¾ããã ãµã¼ãã¹çµäºã«ä¼´ããçæ§ã«ã¯ãä¸ä¾¿ãããããããã¾ããã¨ãå¿ãããè©«ã³ç³ãä¸ãã¾ãã æ¬ä»¶ã«é¢ãããåãåããã¯ãã¡ããããé¡ããããã¾ãã
PHPããMySQLã«ç»é²ããã¦ãããã¼ãã«ãããã¯ã¢ãããããã¨æãã¾ãã ããã§ä»¥ä¸ã®ãããªã³ã¼ããæ¸ããã®ã§ãããå®è¡ããã¾ããã $sql = "mysqldump table_name > 'c:\backup.sql' -u root -p aaaa"; $res = mysql_query($sql,$conn); â»ãtable_nameãã¯ãããã¯ã¢ããããããã¼ãã«åã§ãã ã³ãã³ãããã¯ãè¦ãã¨ãã¦ã¼ã¶åããã¹ã¯ã¼ããå ¥ããã®ã§ã PHPããã¯å®è¡ã§ããªãã®ããªï¼ã£ã¨æã£ã¦ããã®ã§ãããããå¯è½ãªããææãä¿®æ£ãé¡ããã¾ãã ããã¹ãç°å¢ã php5.2.0 MySQL4.0.26 WindowsXPä¸ã®Apache2.0.58ã§ãã¹ã
PHPã§ããæ¥ä»ãã次ã®æ¥ãåã®æ¥ãåå¾ããæ¹æ³ã§ãã 次ã®æ¥ãåå¾ããå ´åã¯ããããªæãã§ã $year = "2007"; $month = "7"; $day = "24"; echo date("Y-m-d", mktime(0, 0, 0, $month, $day+1, $year)); ï¼2007-07-25 ã¾ã ã¾ã ããããã³ã¼ãæ¸ããªãã®ãï¼ $ php -r 'var_dump(strftime("%Y-%m-%d", strtotime("-1 day", strtotime("2007-07-24"))));' string(10) "2007-07-23" $ php -r 'var_dump(strftime("%Y-%m-%d", strtotime("+1 day", strtotime("2007-07-24"))));' string(10) "2007
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
ä¹±æ°çæ PHPã§ç¨æããã¦ããé¢æ°ã使ãä¸çªç°¡åãªæ¹æ³ã§ãã <?php $ran1 = mt_rand(); // å¼æ°ãªã $ran2 = mt_rand(0, 10); // 0ï½10ã¾ã§ã®ä¹±æ°å¤ $ran3 = mt_rand(100, 500); // 100ï½500ã¾ã§ã®ä¹±æ°å¤ ?> ã©ã³ãã æååçæï¼æåã³ã¼ãå©ç¨ï¼ a-z,A-Z,0-9 ã使ã£ã¦ã©ã³ãã æååãçæãã¾ããï¼ä»åã¯10æ¡ï¼ ããæåã®ã¿ãæ°åã®ã¿ã®ã©ã³ãã æååï¼ä¹±æ°ï¼ãçæãããå ´åã¯ã mt_rand() ã®ASCIIæåã³ã¼ãã®é¨å㨠ifæ ã®é¨åãå¤æ´ãã¦ããã¨ããã§ãã <?php for ($i = 0, $str = null; $i < 10; ) { $num = mt_rand(0x30, 0x7A); // ASCIIæåã³ã¼ã if ((0x30 <= $num && $
ãã¡ã¤ã«æä½ ãã¡ã¤ã«æä½ã®åºæ¬ æ°ãããã¡ã¤ã«ãä½æãã¦æ¸ãè¾¼ãã«ã¯ããã¡ã¤ã«ãä½ã£ã¦éãå 容ãæ¸ãåºãã¦ãã¡ã¤ã«ãéãã¾ãã $ãã¡ã¤ã«ãã³ãã«=fopen("ãã¡ã¤ã«å","ã¢ã¼ã"); ãã®éã§ãã¡ã¤ã«æä½ãè¡ã fclose($ãã¡ã¤ã«ãã³ãã«); ãã¡ã¤ã«ãéãã«ã¯fopenã使ãã¾ãã ãã¡ã¤ã«ãéããã«ã¯fcloseã使ãã¾ãã ãã¡ã¤ã«ãã³ãã«ã¯ãã¡ã¤ã«ã表ãã¾ãã ãã¡ã¤ã«åã«ã¯éããããã¡ã¤ã«ã®ä½ç½®ï¼ãã£ã¬ã¯ããªã»ãã©ã«ãï¼ã¨ãã¡ã¤ã«åãè¨è¿°ãã¾ãã ã¢ã¼ãã«ã¯èªè¾¼ãæ¸è¾¼ã®æå®ãè¨è¿°ãã¾ãã
PHPã®çµé¨ããã人ãªãã°ãã¼ã¿ãã¼ã¹ãæ±ãã®ã«PHPã使ç¨ãããã¨ãããã¨æãã¾ããå¤ãã®å ´åããã¼ã¿ãã¼ã¹ã¯ãã¼ã¿ã®åéã¨è§£æãç®çã¨ããæè»æ§ã®ããæ å ±ã¹ãã¬ã¼ã¸ã¨ãã¦ä½¿ç¨ãããéçºè ã®ã³ãã¥ããã£ã§ä¸è¬çã«ãã使ç¨ããã¦ãã¾ããå¤ãã®ä¸è¬çãªãã¼ã«ã§ã¯ã1ã¤ã®åé¡ã«å¯¾ãã¦å¤ãã®ã¢ããã¼ããã¨ããã¾ããããã¼ã¿ãã¼ã¹ã·ã¹ãã ã§ã¯æ¨æºæ©è½ã®éãã¯ã»ã¨ãã©ããã¾ããã æ å ±ãæ±ãçæ³çãªæ¹æ³ã¨ãã¦ãããã¤ãã®ãã¼ã¿ãã¼ã¹ã·ã¹ãã ã競åãã¦ãã¾ããæ°ç¾ä¸äººã®éçºè ã使ç¨ãã¦ããPHPè¨èªã§ã¯ã1人ã®éçºè ãåãæ®ãããªãããã«ãããã®ãã¼ã¿ãã¼ã¹ã¨ã³ã¸ã³ã®å¤§é¨åããµãã¼ããã¦ãã¾ãã PHPã§ã®ãã¼ã¿ãã¼ã¹ã®ã¤ã³ã¿ãã§ã¼ã¹éçºã¯ãçæ³çãªãã¼ã¿ãã¼ã¹ã¨ã®éä¿¡æ¹æ³ãèãæããåæè¨è¨ã®éãã«ã¯å®æããªããã¨ãã»ã¨ãã©ã§ããã¨ããã®ããéçºè ã馴æã¿ã®ãªããã¼ã¿ãã¼ã¹ã«PHPãæ¥ç¶ãããªããã°
ã¯ããã« PHPçéã§ã¯ç¾å¨ãPHP 4ããPHP 5ã¸ã®ç§»è¡ãé²ãã§ãã¦ãããããæè¿ã§ã¯PHP 5ã®æ©è½ãæ´»ç¨ãããã¬ã¼ã ã¯ã¼ã¯ãå¤ãåºã¦ããããã«ãªãã¾ããã PHP 5ã¯ãPHP 4ã«æ¯ã¹ãªãã¸ã§ã¯ãæåã®ãµãã¼ããé度é¢ã§ã®åä¸ãªã©ãåãä¸ããããä¸ãæã注ç®ãã¹ãç¹ã§ãããã¼ã¿ãã¼ã¹ã¸ã®ã¢ã¯ã»ã¹ãæ½è±¡åããã¬ã¤ã¤ã¼ã¨ãã¦PDOãç»å ´ãã¾ããã ä»åã¯ãã®PDOã«æ³¨ç®ãããµã³ãã«ã交ãã¦PDOã®ä½¿ãæ¹ãç´¹ä»ãã¾ãã 対象èªè PHP 5ã使ã£ããã¨ãããæ¹ ä»¥åPEAR::DBãªã©ãç¨ãã¦ãã¼ã¿ãã¼ã¹ã使ã£ãã¢ããªã±ã¼ã·ã§ã³ãä½æãããã¨ã®ããæ¹ å¿ è¦ãªç°å¢ PDOã¯PHP 5.1ããæ¨æºã§å°å ¥ãããããã«ãªãã¾ãããWindows/UNIXãåããå©ç¨ãããã¨ãã§ãã¾ãããã£ã¦PHP 5.1ã®ç°å¢ã¨ãPDOã®åä½ã«å¿ è¦ãªãã¼ã¿ãã¼ã¹ã®æ§ç¯ãè¡ã£ã¦ãã ããã PDOã¨ã¯ PDOï¼
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}