Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP½«Í¼Æ¬´æÈëMYSQL

 ÍêÕûµÄʵÏÖÁËPHP½«Í¼Æ¬´æÈëMYSQL
ǰÌ᣺
 1 Ê×ÏȱØÐëÓµÓÐPHPµÄÔËÐл·¾³£¬ÁíÍ⻹µÃÓÐMYSQLÊý¾Ý¿â
 2 Èç¹ûÎļþ²»ÄÜÉÏ´«³É¹¦Çë¼ì²épicsÊÇ·ñÊÇ¿ÉдµÄȨÏÞ
Ê×ÏÈÏȰÑpic2db.rarÎļþ½âѹµ½PHP¿ÉÒÔÔËÐÐĿ¼Ï¡£
Æä´ÎÔÚMYSQLÖн¨Á¢Ò»¸öÊý¾Ý¿â:pic2db,È»ºóÔÚ¸ÃÊý¾Ý¿âϽ¨Á¢Ò»¸ö±í£¬±í½á¹¹Îª£º
CREATE TABLE `pic` (
  `pic_id` int(11) NOT NULL auto_increment,
  `pic_userid` int(11) NOT NULL,
  `pic_content` longblob NOT NULL,
  PRIMARY KEY  (`pic_id`)
)
ÔÙ½Ó×ÅÐÞ¸Äcommon_db.phpÖеÄÊý¾Ý¿âÁ¬½ÓµÄÓû§ÃûºÍÃÜÂ룬¸ù¾ÝÄãMYSQLÉèÖõÄÀ´
×îºóÔËÐÐupload.phpÎļþ½øÐÐÉÏ´«£¬¶ødisplay_all.phpÊÇÏÔʾÊý¾Ý¿âÖÐËùÓеÄͼƬ
 Í¼Æ¬ÉÏ´«upload.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÉÏ´«</title>
</head>
<body>
<form action="post_action.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p> </p>
<p>
<label></label>
<label>
<input type="file" name="file" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Ìá½»" />
</label>
</p>
<p> </p>
</form>
</body>
</html>

 
Á¬½ÓÊý¾Ý¿âµÄcommon_db.php:
<?php
/**
* Á¬½ÓÊý¾Ý¿âµÄº¯Êý
* Á¬½Ó³É¹¦½«»á·µ»ØÒ»¸öÁ¬½Ó×ÊÔ´
* @return mix
*/
function getLink() {
$link = mysql_connect("localhost","root","") or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Óʧ°Ü!");
if(!mysql_select_db("crm",$link)) die("Êý¾Ý¿âÁ¬½Óʧ°Ü!");
return $link;
}
?>
´¦ÀíÉÏ´«µÄpost_action.php:
<?php
/**
* ±¾ÎļþÊǽ«Í¼Æ¬ÎļþÉÏ´«µ½·þÎñÆ÷¶Ë
* ²¢ÇÒ¶ÁÈ¡¸ÃÎļþµÄ¶þ½øÖÆÄÚÈÝ´æÈëµ½MYSQLµÄ
* pic±íÖÐlongblob×Ö¶Î
*
*/
//Ç¿ÖÆÒ³ÃæÊ¹ÓÃgb2312±àÂë
header("Content-Type: text/


Ïà¹ØÎĵµ£º

Mysql³£ÓÃÃüÁî½Å±¾

Mysql³£ÓÃÃüÁî½Å±¾
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÊÇ mysql -hÖ÷»ú -uÓû§Ãû -pÃØÃÜ
Àý×ÓÊÇ mysql -hlocalhost -uroot -p123456
Ҫȷ¶¨mysql°²×°Ê±ºò¹´Ñ¡ÁË¿ÉÒÔÔ¶³ÌÁ´½Ó¡£Èç¹ûµÇ½±¾µØ¼ÆËã»ú£¬-h¿ÉÒÔÊ¡ÂÔ£¬¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬 ......

PHPµÄÈÕÆÚʱ¼äº¯Êýdate()

 1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øÐ¡Ð´y±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øÐ¡Ð´nÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔ·ݵÄ3¸öËõд×Ö·û£¬¶øÐ¡Ð´mÔò±íÊ¾Ô ......

php^

  PHPÊÇÒ»ÖÖÓÃÓÚ´´½¨¶¯Ì¬WEBÒ³ÃæµÄ·þÎñ¶Ë½Å±¾ÓïÑÔ¡£ÈçͬASPºÍColdFusion£¬Óû§¿ÉÒÔ»ìºÏʹÓÃPHPºÍHTML±àдWEBÒ³Ãæ£¬µ±·ÃÎÊÕßä¯ÀÀµ½¸ÃÒ³ÃæÊ±£¬·þÎñ¶Ë»áÊ×ÏȶÔÒ³ÃæÖеÄPHPÃüÁî½øÐд¦Àí£¬È»ºó°Ñ´¦ÀíºóµÄ½á¹ûÁ¬Í¬HTMLÄÚÈÝÒ»Æð´«Ë͵½·ÃÎʶ˵Ää¯ÀÀÆ÷¡£µ«ÊÇÓëASP»òColdFusion²»Í¬£¬PHPÊÇÒ»ÖÖÔ´´úÂ뿪·Å³ÌÐò£¬ÓµÓÐºÜºÃµÄ¿çÆ½Ì¨¼ ......

PHP£¬Ìæ»»¶à¸öÎļþÖеÄÎı¾

ÐèÇó£º
    ÐèÒª¶ÔÁ½¸öĿ¼ÖеÄÎļþÄÚÈݽøÐвéÕÒÌæ»»£¬Á½¸öĿ¼²éÕÒÌæ»»µÄÄÚÈݲ»Ò»Ñù¡£
    ÊµÏÖÖÐ×¢Ò⼸µã£º
    £¨1£©º¯ÊýµÝ¹éµ÷Óã¬À´¼ìË÷×ÓĿ¼£»
    £¨2£©º¯ÊýÃû¿ÉÒÔÒÔ²ÎÊýÐÎʽ´«µÝ£»
    £¨3£©Ó㿽øÐзÇ̰À·Æ¥Å䣻
   ......

flash+php¶àÎļþÉÏ´« (ÄÚº¬Ô´Îļþ)

ÍøÉϵÄͼƬÉÏ´«ºÜÉÙ£¬Òª²»¾ÍÊÇÀÏÍâµÄ¶«Î÷£¡
ÓÃ×Å×ܸоõ²»Ë¬~~ÓÚÊÇ×Ô¼º×öÁËÒ»¸ö£¡Ä¿Ç°»ù±¾ÉϹ¦ÄÜÒѾ­Íê³É¡£ÍêÈ«¹ú²ú¹þ¹þ
ÇëÖ§³Ö¹ú»õ£¡
Éϼ¸¸öͼ£º
Ö÷ÒªÌØµã½éÉÜһϣº
1.³ÌÐòÓÅ»¯ ÔÚ1.0°æ±¾»ù´¡ÉÏÓÅ»¯Á˳ÌÐò
2.ÐÞÕýÉÏ´«Ê±ºò¹ö¶¯ÌõBUG
3.¿ÉÖØ¸´Ìí¼ÓÁÐ±í ²»Öظ´Ìí¼ÓÒÑÓÐͼƬ
4.¿ÉÇå¿ÕͼƬÁÐ±í£¬Ò²¿Éµ¥ÕÅͼƬɾ³ý
5.Ìå ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ