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

php Á¬½ÓaccessµÄ´úÂë

<?php
$connstr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("data.mdb");
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC);
$issuetime=date("Y-m-d H:i:s");
$sql="insert into test values("","",...)";
$result=odbc_exec($connid,$sql);
if($result) echo "successful";
else echo "failed";
?>
[/php]
accessÊý¾Ý¿âÃûΪdata.mdb,ÀïÃæÓÐÒ»¸öÊý¾Ý±ítest,´úÂëÔËÐгɹ¦£¬Ï£Íû¶ÔҪʹÓÃPHP+Access×öphp³ÌÐòµÄÈËÓÐËù°ïÖú


Ïà¹ØÎĵµ£º

PHP°²×°³ÌÐòÖÆ×÷

<?php
header("Content-type:text/html;charset=gb2312"); //¿´ÄãÓõÄÊÇʲô±àÂ룬Ҫ±£³ÖÒ»Ö¡£
$files="config.php"; //ҪдÈëµÄÅäÖÃÎļþ¡£
if(!is_writable($files)){ //ÅжÏÊÇ·ñÓпÉдµÄȨÏÞ£¬linux²Ù×÷ϵͳҪעÒâÕâÒ»µã£¬windows²»±Ø×¢Òâ¡£
echo "<font color=red>Îļþ²»¿Éд</font>";
......

¹ØÓÚACCESSÏÂOleDbParameterµÄʹÓÃ

½ñÌ죬»¹ÊÇÔÚ×öÄǸöÏîÄ¿£¬ÒÀȻʹÓÃÍù³£µÄsqlhelperÓ÷¨£¬Íù³£µÄÊý¾Ý¿â²Ù×÷À࣬µ«ÊÇÆ«Æ«µ÷ÊÔ²»³É¹¦£¬¶øÇÒ×îÖØÒªµÄÊÇ£¬Ëü²»±¨´í
ÖÐÎç³Ô·¹»ØÀ´£¬±¾À´Ïë´òËã˯¸öÎç¾õµÄ£¬µ«ÊÇÏîÄ¿Ì«½ôÆÈÁË£¬ÓÚÊÇÓÖ¸ú³µ³µÑо¿ÁËÒ»ÖÐÎ磬×îºó£¬·¢ÏÖÈç¹û²»ÓÃ@²ÎÊý´«µÝµÄ»°£¬ÊÇÕý³£ÔËÐеģ¬ÓÚÊÇ°Ù¶ÈÁËһϣ¬ÄÇЩÈË˵ҪÓÓ£¿”µ±Õ¼Î»·û
......

Ò»¸ö¼òªµÄÖ§³ÖHTTPSµÄPHP CURL·â×°º¯Êý

±êÌâÓе㳤£¬Æäʵ¾ÍÊÇÓÃÀ´Ïòhttps·þÎñÆ÷postÊý¾Ý
function curlPost($url, $data, $timeout = 30)
{
$ssl = substr($url, 0, 8) == "https://" ? TRUE : FALSE;
$ch = curl_init();
$opt = array(
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_ ......

¹ØÓÚPHPÄã¿ÉÄܲ»ÖªµÀµÄ10¼þÊÂ

С±à֮ǰҲÔø±¨µ¼¹ýPHP¿ª·¢ÈËÔ±ÈÝÒ׺öÂԵļ¸µã¾«»ª,³ýÁËһЩ¾«»ª¼¼Êõ·½·¨Í⣬ºÜ¶àϸ΢֮´¦Ò²ÊdzÌÐòÔ±
ÃÇÈÝÒ׺öÂԵģ¬ÏÂÃæÎÒÃÇΪÄú×ܽáÁË10¸ö¹ØÓÚPHPÄã¿ÉÄܲ»ÖªµÀµÄÊÂÇé¡£
¡¡¡¡¹ØÓÚPHP¸ü¶àÄÚÈÝ£¬»¶Ó­·ÃÎÊ£ºPHP¿ª·¢»ù´¡ÈëÃÅ
¡¡¡¡1.ʹÓÃip2long() ºÍlong2ip()º¯ÊýÀ´°ÑIPµØַת»¯³ÉÕûÐÍ´æ´¢µ½Êý¾Ý¿âÀï¡£
¡¡¡¡ÕâÖÖ·½·¨°Ñ´æ´¢ ......

PHP ÅÅÐòËã·¨½âÎö

<?
//²åÈëÅÅÐò£¨Ò»Î¬Êý×飩
function insert_sort($arr){
¡¡$count = count($arr);
¡¡for($i=1; $i<$count; $i++){
¡¡¡¡$tmp = $arr[$i];
¡¡¡¡$j = $i - 1;
¡¡¡¡while($arr[$j] > $tmp){
¡¡¡¡¡¡$arr[$j+1] = $arr[$j];
¡¡¡¡¡¡$arr[$j] = $tmp;
¡¡¡¡¡¡$j--;
¡¡¡¡}
¡¡}
¡¡return $arr;
}
¡¡¡¡
//Ñ¡Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ