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程序的人有所帮助
相关文档:
今天,还是在做那个项目,依然使用往常的sqlhelper用法,往常的数据库操作类,但是偏偏调试不成功,而且最重要的是,它不报错
中午吃饭回来,本来想打算睡个午觉的,但是项目太紧迫了,于是又跟车车研究了一中午,最后,发现如果不用@参数传递的话,是正常运行的,于是百度了一下,那些人说要用“?”当占位符
......
关于PHP的前途(三) (来自本站的消息)
6.PHP的简要历史
PHP最初作为一种用Perl写成的简单小巧的CGI工具,被称为“个人主页工具(Personal Home Page Tools)”,后来改称为“个人主页构建工具箱(Personal Home Page Construction Kit)”。
也曾叫做“专业主页工具(Professional Home P ......
例子程序。
<?php
define('CLIENT_MULTI_RESULTS', 131072);
$link = mysql_connect("127.0.0.1", "root", "",1,CLIENT_MULTI_RESULTS) or die("Could not connect: ".mysql_error());
mysql_select_db("vs") or die("Could not select database");
?> ......
it is 21th of May. The Month of PHP Security
(http://www.php-security.org) is still running and we have reached a
vulnerability count of 40 vulnerabilities, which is nearly as much as we
disclosed during the whole Month of PHP Bugs in 2007. However there are
11 more days until the end of May and ......
匹配中文字符的正则表达式
: [\u4e00-\u9fa5]
匹配双字节字符(包括汉字在内)
: ["\x00-\xff]
应用:计算字符串的长度
(一个双字节字符长度计2,ASCII字符计1)
String.prototype.len=function(){return
th ......