PHP Classes

cannot find file always

Recommend this page to a friend!

      mdb  >  All threads  >  cannot find file always  >  (Un) Subscribe thread alerts  
Subject:cannot find file always
Summary:seems like class cannot always resolve real path to database
Messages:1
Author:Srdjan Jocic
Date:2008-08-29 09:26:04
 

  1. cannot find file always   Reply   Report abuse  
Picture of Srdjan Jocic Srdjan Jocic - 2008-08-29 09:26:05
I had a problem with some database hosted on IIS server. Some files connected without problem, some dont, some little do - little dont.

It was my first time to deal with IIS server, so I noticed some strange things when using include functions.

I resolved problem like this: I fixated $dsn (path) in class itself, using command from class ODBC_Conn and didnt have any more problems.

$dsn = str_replace("/", "\\", $_SERVER["DOCUMENT_ROOT"]) . "\\" . str_replace("/", "\\", 'path/database.mdb');

If somebody could tell some better way, or to point out what should be considered when using this class (since I'm no expert), would be thankfull!

Sergej