php Êý¾Ý¿âµÄ·â×°Àà
<?php
class DB
{
private $link;
function connectDB($dbhost, $dbuser, $dbpw, $dbname="", $pconnect = 1)
{
if($pconnect)
{
if(!$this->link = mysql_pconnect($dbhost, $dbuser, $dbpw))
{
$this->mysqlErrorMessage('Can not connect to MySQL');
}
}
else
{
if(!$this->link = mysql_connect($dbhost, $dbuser, $dbpw))
{
$this->mysqlErrorMessage('Can not connect to MySQL');
}
}
if(!empty($dbname))
{
mysql_select_db($dbname,$this->link);
}
mysql_query("set names 'gb2312'",$this->link);
}
function selectDB($dbName)
{
mysql_select_db($dbName,$this->link);
}
function query($sql)
{
if(!($query = mysql_query($sql,$this->link)))
{
$this->mysqlErrorMessage('SQL Error',$sql);
}
return $query;
}
function mysqlErrorMessage($errorTitle,$errorContent)
{
echo $errorTitle." : ".$errorContent."<br>";
}
function fetchArray($query)
{
return mysql_fetch_array($query);
}
function fetchObject($query)
{
return mysql_fetch_object($query);
}
function closeDB()
{
mysql_clos
Ïà¹ØÎĵµ£º
//´´½¨Îļþ¼ÐµÄ·½·¨
//$path ΪÎļþ¼Ð²ÎÊý£¬Èç £¨c:/program files/makedir£©
function createFolders($path) {
if (!file_exists($path)) {
$this->createFolders(dirname($path));
mkdir($path, 0777);
&n ......
°æÈ¨ÉùÃ÷£º¿ÉÒÔÈÎÒâ×ªÔØ£¬×ªÔØÊ±ÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://www.5ilinux.com/lamp01.html
¹Ø¼ü×Ö£ºapache+mysql+php apache mysql php ÅäÖà lamp ·þÎñÆ÷ web
Linux+Apache+Mysql+PHPµäÐÍÅäÖÃ
µ÷ÊÔ»·¾³£ºRedhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4
LinuxϵͳµÄ°²×°ÎҾͲ»½²Á ......
1¡¢Êý×éµÄÉêÇëºÍʹÓãº
$array=array(array(2,324,34));
echo $array[0][1];
Ö±½ÓÉêÇëʹÓãº
$student[0][0]="ÎÒ";
$student[0][1]="ÊÇ";
$student[1][0]="Ë";
$student[1][1]="ά";
echo $student[1][0];
2¡¢±éÀú£º ......
ĿǰÓв»ÉÙAMP£¨Apache\MySQL\PHP£©µÄ¼¯³ÉÈí¼þ£¬¿ÉÒÔÈÃÎÒÃÇÒ»´Î°²×°²¢ÉèÖúá£Õâ¶ÔÓÚ²»ÊìϤAMPµÄÓû§À´Ëµ£¬ºÃ´¦¶à¶à¡£
Ò»¡¢Ê¹ÓÃAMP¼¯³ÉÈí¼þµÄÓŵ㣺
1¡¢¿É±ÜÃâÓÉÓÚȱ·¦AMPµÄ֪ʶ£¬¶øÎÞ·¨ÕýÈ·ÉèÖû·¾³£»
2¡¢¿É¿ìËÙ°²×°²¢ÉèÖúÃAMP»·¾³£¬ÈÃÎÒÃÇÖ±½Ó¿ªÊ¼ÕæÕý¸ÐÐËȤµÄÈí¼þ£¬Èçxoops£»
3¡¢¿É·½±ãµÄ´î½¨²âÊÔ»·¾³£¬¶ÔÓÚ² ......