10/3/2023 0 Comments Connecting sqlpro with netbeansView your php info and check to see if you a section like: SQLite Or just put path in single quotes so PHP won't try and parse the string $db ='C:\New folder\test.db' Īnd believe it or not in most cases unix paths will work: $db ="C:/New folder/test.db" Īs for the remainder of your problem, you need to make sure you have sqlite 2 enabled. C:\New folder est.dbĬhange your $db variable definition to $db ="C:\New folder\\test.db" One problem you have is that you are escaping (inadvertently) some of your path characters.Īs your var_dump shows. Kindly advise where did I do wrong? The path I specified was correct but when I print out, it shows wrong path. $handle = sqlite_open($db) //or die("Could not open database") įatal error: Call to undefined function sqlite_open() in C:\inetpub\wwwroot\NetBeans\PHP&SQLITE.php on line 18 which is "$handle = sqlite_open($db) //or die("Could not open database") " Test to print my directory path of the database. My code as follows: $db ="C:\New folder\test.db" I already researched on the web for alot of sources but the my directory path still returns some strange error (Sorry if i'm too noob, first time learning). I already placed the database file inside my r/w folder but it Fatal error: Call to undefined function sqlite_open(). I'm using SQLITE version 3 and PHP version 5.4.3. I'm trying to use PDO driver however the error keep prompting me saying cant find the driver when it's in my extension php folder. $handle = new PDO($file) or die("Could not open database") įatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:\inetpub\PDO->_construct('sqlite:C:\New f.') #1 thrown in C:\inetpub\wwwroot\NetBeans\PHP&SQLITE.php on line 20 My latest code as follows: $file ="sqlite:C:\New folder\\test.db"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |