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
Ïà¹ØÎĵµ£º
Ò»°ãµÄÎļþ°²È«ÏÂÔØ·½·¨¿ÉÒÔʹÓÃÏÂÃæµÄ´úÂë:
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
//±äÁ¿¶¨Ò壬»ÍÖÔ²»¡Ê±µÄ½Ç¶È´óС
define("ANGLELENGTH",3);
/**
* »æÖÆͼƬ
* @param $title 3DͼµÄ±êÌâ
......
ÔÚphpÖз¢ËÍÓʼþ¿ÉÒÔÓÃ×Ô´øµÄmail()º¯Êý£¬µ«ÊÇÕâ¸öº¯Êý²»×ãµãºÜÃ÷ÏÔ£¬×îÖ÷ÒªÊÇÔÛ±¾»úÉÏûÓа²×°smtp·þÎñ¾Íû·¨Ê¹ÓÃmail()¡£
µ±È»ÏÖÔÚ»¹ÓÐphpÆäËûµÄ²å¼þ¡¢ÀàʲôµÄ£¬ÄÇЩҲÐí¹¦ÄÜÆëÈ«£¬¿ÉÊÇÍâ¼Ó¾Í¸Ð¾õ²»Ë¬¡£
ÄÇÆäËû°ì·¨µÄ»°£¬Ò»°ã»áÏ뵽ͨ¹ýSMTP·þÎñÆ÷À´·¢ËÍÓʼþ£¬µ«ÊÇÒ²»á²úÉúһϵÁÐÎÊÌ⣨¾ßÌåÓÐÄÄЩÎÊÌâ¿É¼û²Î¿¼×ÊÁÏ"ÎÞÐ ......
<?php
// ½«Êý×éת»»³ÉJson¸ñʽ£¬ÖÐÎÄÐèÒª½øÐÐURL±àÂë´¦Àí
function Array2Json($array) {
arrayRecursive($array, 'urlencode', true);
$json = json_encode($array);
$json = urldecode($json);
// extÐèÒª²»´øÒýºÅµÄboolÀàÐÍ
&n ......
excelÕâÀàÎļþÆäʵ¾ÍÊÇÌØÊâ¸ñʽµÄÎı¾Îļþ£¨Ó¦¸ÃËùÓиñʽ¶¼ÊÇÌØÊâ¸ñʽµÄÎı¾ÎļþºÍ¶þ½øÖÆÎļþ£©£¬
excel²»Í¬µÄÐÐÌåÏÖÔÚÎı¾ÖеĻ»ÐУ¬ÀïÃæµÄÐèҪתÒåµÄ×Ö·û°üÀ¨,\ºÍ\r\nÕâÁ½¸ö£¬Óöµ½ÕâЩ×Ö·ûµÄʱºòÕâ¸öµ¥Ôª¸ñÐèÒªÓÃ""¸ñ¿ª ......