30Blog

Zblog development tutorial: creating a new connection to a specified database

Creates a new connection to the specified database

 <? php require './ zb_ system/function/c_ system_ base. php'; $db=new DBMySql; if($db->Open(array( $zbp->option['ZC_MYSQL_SERVER'], $zbp->option['ZC_MYSQL_USERNAME'], $zbp->option['ZC_MYSQL_PASSWORD'], 'new database name', $zbp->option['ZC_MYSQL_PRE'], $zbp->option['ZC_MYSQL_PORT'], $zbp->option['ZC_MYSQL_PERSISTENT'] ))==false){ $zbp->ShowError(67,__FILE__,__LINE__); } //Database operations $db->Close(); ?>

Blog 3.1 and above can only be implemented in PHP.

QQ pre-sale consultation