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

php Á¬½ÓÊý¾Ý¿âµÄÀà

<?php
class Access//AccessÊý¾Ý¿â²Ù×÷Àà
{
var $databasepath,$constr,$dbusername,$dbpassword,$link;//ÀàµÄÊôÐÔ
function Access($databasepath,$dbusername,$dbpassword)//¹¹Ô캯Êý
{
$this->databasepath=$databasepath;
$this->username=$dbusername;
$this->password=$dbpassword;
$this->connect();
}

function connect()//Êý¾Ý¿âÁ¬½Óº¯Êý
{
$this->constr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath($this->databasepath);
$this->link=odbc_connect($this->constr,$this->username,$this->password,SQL_CUR_USE_ODBC);
return $this->link;
//if($this->link) echo "¹§Ï²Äã,Êý¾Ý¿âÁ¬½Ó³É¹¦!";
//else echo "Êý¾Ý¿âÁ¬½Óʧ°Ü!";
}

function query($sql)//ËÍÒ»¸ö²éѯ×Ö·û´®µ½Êý¾Ý¿âÖÐ
{
return @odbc_exec($this->link,$sql);
}

function first_array($sql)//´ÓaccessÊý¾Ý¿âÖзµ»ØÒ»¸öÊý×é
{
return @odbc_fetch_array($this->query($sql));
}

function fetch_row($query)//·µ»Ø¼Ç¼ÖеÄÒ»ÐÐ
{
return odbc_fetch_row($query);
}

function total_num($sql)//È¡µÃ¼Ç¼×ÜÊý
{
return odbc_num_rows($this->query($sql));
}

function close()//¹Ø±ÕÊý¾Ý¿âÁ¬½Óº¯Êý
{
odbc_close($this->link);
}

function insert($table,$field)//²åÈë¼Ç¼º¯Êý
{
$temp=explode(',',$field);
$ins='';
for ($i=0;$i<count($temp);$i++)
{
$ins.="'".$_POST[$temp[$i]]."',";
}
$ins=substr($ins,0,-1);
$sql="INSERT INTO ".$table." (".$field.") VALUES (".$in


Ïà¹ØÎĵµ£º

phpÏÂÔØÎļþ´úÂë

Ò»°ãµÄÎļþ°²È«ÏÂÔØ·½·¨¿ÉÒÔʹÓÃÏÂÃæµÄ´úÂë:
1. <?php?
2.
3. $durl = 'file/phpcms2008_o2abf32efj883c91a.iso';
4. $filename = 'phpcms2008_o2abf32efj883c91a.iso';
5. $file = @fopen($durl, 'r');
6. header("Content-Type: application/octet-stream");
......

phpÀ¬»ø»ØÊÕ»úÖÆ

ÿһÖÖÓïÑÔ¶¼ÓÐ×Ô¼ºµÄ×Ô¶¯À¬»ø»ØÊÕ»úÖÆ£¬ÈóÌÐòÔ±²»±Ø¹ý·Ö¹ØÐijÌÐòÄÚ´æ·ÖÅ䣬µ«ÊÇÔÚOOPÖУ¬ÓÐЩ¶ÔÏóÐèÒªÏÔʽµÄÏú»Ù£»·ÀÖ¹³ÌÐòÖ´ÐÐÄÚ´æÒç³ö¡£
Ò»¡¢PHP À¬»ø»ØÊÕ»úÖÆ(Garbage Collector ¼ò³ÆGC)
ÔÚPHPÖУ¬Ã»ÓÐÈκαäÁ¿Ö¸ÏòÕâ¸ö¶ÔÏóʱ£¬Õâ¸ö¶ÔÏó¾Í³ÉΪÀ¬»ø¡£PHP»á½«ÆäÔÚÄÚ´æÖÐÏú»Ù£»ÕâÊÇPHP µÄGCÀ¬»ø´¦Àí»úÖÆ£¬·ÀÖ¹ÄÚ´æÒç³ö¡ ......

PHPµÄ°²×°ÒÔ¼°ÅäÖÃ

°²×°ÒÔ¼°ÅäÖÃ
1.       °²×°Apache-2.2.4(Apache_Dir=D:\myspace\Apache-2.2.4)
2.       ½âѹ°²×°PHP-5.2.11(PHP_Dir=D:\myspace\PHP-5.2.11)
3.       ÕÒµ½PHP-5.2.11ϵÄphp.ini-dist£¬¸ÄÃûΪphp.ini
4.  &nb ......

php JSON ÖÐÎÄÂÒÂë½â¾ö·½°¸

<?php
// ½«Êý×éת»»³ÉJson¸ñʽ£¬ÖÐÎÄÐèÒª½øÐÐURL±àÂë´¦Àí
function Array2Json($array) {
    arrayRecursive($array, 'urlencode', true);
    $json = json_encode($array);
    $json = urldecode($json);
    // extÐèÒª²»´øÒýºÅµÄboolÀàÐÍ
&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ