Ho il seguente codice, ma credo ci sia un errore nella sintassi. Penso che il problema sia nel percorso del database... il sito è su ARUBA.
Ovviamente "miodominioit" viene sostituito con il nome reale del dominio.codice:<?php error_reporting(E_ALL); ini_set('display_errors', '1'); class DB { private static $dbObject; private $dbConnection; private $dbfile = "d://inetpub//webs//miodominioit//mdb-database//SZMobileConfig.mdb"; private $conn; function __construct(){ } function __destruct(){ $this->conn->Close(); } function initDB(){ $this->conn = new COM("ADODB.Connection") or die("Cannot start ADO"); $this->conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=".$this->dbfile); return true; } static function getInstance(){ if(self::$dbObject==null){ $c = __CLASS__; self::$dbObject = new $c; } return self::$dbObject; } function query($sql){ $this->initDB(); $rs = $this->conn->Execute($sql); return $rs; } } ?>
Dove devo correggere?
Grazie!

Rispondi quotando