PHPÓëMYSQLµÄÎÊÌâ
ÎÒÔÚas4Éϰ²×°ÁËmysqlºÍphp-mysql
rpm -qa | grep php-mysql
php-mysql-4.3.9-3.22.4
rpm -qa | grep MySQL
MySQL-shared-4.1.20-0
MySQL-devel-standard-4.1.20-0.rhel4
MySQL-client-4.1.20-0
MySQL-server-standard-4.1.20-0.rhel4
¿ÉÊÇÔÚä¯ÀÀÆ÷´ò¿ªweb²âÊÔÒ³ÃæÊ±¿Õ°×£¬¾ßÌå²âÊÔphpÎļþÈçÏ£º
more testconnectmysql.php
<?php
$link=mysql_connect('localhost','root','123456');
if(!$link) echo "ʧ°Ü!";
else echo "³É¹¦!";
mysql_close();
?>
¶ø´ò¿ªÆäËûphpÎļþÕý³££¬Èç
more test.php
<?
phpinfo();
?>
ÇëÎʸÃÈçºÎ½â¾ö£¬Ð»Ð»¡£
ÊDz»ÊÇphp-mysql»¹ÒªÅäÖÃɶ¶«Î÷ÄØ£¿
²¹³äÒ»¾äphp-mysqlºÍmysql¶¼ÊÇrpm°²×°µÄ
./mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 4.1.20-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
¿ÉÒÔ·ÃÎÊsqlµÄ¡£
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; error_reporting is a bit-field. Or each number up to get desired error
; reporting level
; E_ALL  
Ïà¹ØÎÊ´ð£º
ÎÒ¸ÕѧϰphpÇëÎÊ£¬Èç¹ûÎÒ°ÑphpÎļþÉÏ´«ÖÁ·þÎñÆ÷ºó£¬ÀýÈçhttp://www.****.com/cast.phpÕâ¸öÎļþ»á²»»á±»±ðÈËÏÂÔØ»ò¸´Öư¢£¿
¿ÉÒÔ±»ÏÂÔØ£¬Ò²¿ÉÒÔ²»±»ÏÂÔØ£¬¿´web·þÎñÆ÷¶Ô¸ÃÎļþȨÏÞµÄÅäÖÃ
¿´Äã¶ÔÎļþȨÏÞµÄÉèÖÃ
......
ÎÒÔÚÍøÕ¾µÄÒýµ¼Ò³ÖÐÌí¼ÓÁË<embed src="ÒôÀÖµØÖ·" autostart="true" loop="true" hidden="true"></embed>
Õâ¾ä»°£¬È»ºóÌø×ªÒ³Ãæºó£¬±³¾°ÒôÀÖ¾ÍûÓÐÁË£¬ÔõôÈÃÕ ......
index.phpÄÚÈÝ£º
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......
ÎÒµÄÏîÄ¿ËùÔڵĻ·¾³ÊÇphp+apache+linux
ÏÖÎÒÖØÆô·þÎñÊÇ service httpd restart
ÏÖÎÒÏë¶¨Ê±ÖØÆô´ËÏî·þÎñ£¨¶¨ÔÚÿÌìÏÂÎç4µã£© ÔõôʵÏÖѽ£¬¶àл
crontab
* 16 * * * service httpd restart
ѧϰ + d ......