how to change the path dynamically according to? |
Post Reply | Page <123 |
Author | |
djju1029
Senior Member Joined: Aug 02 2016 Location: the US Status: Offline Points: 126 |
Post Options
Thanks(0)
|
Hi OE Team,
I create mydb.php include it into the header of BaseLayer. The path of db is written as: <?php $db = new PDO('sqlite:../Data/Local_previs_DB/nmu.db'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); However, some page could not load the db because its location is different depths under index.php with db path. For example, If test2 page location will be localhost/test/test2.php, then db path should be $db = new PDO('sqlite:../../Data/Local_previs_DB/nmu.db');,but I have no idea how to change the path dynamically according to current page location. I saw your source. The including_once = "the path of OEDB.php" is changed dynamically according to page location but I couldn't figure out how to do that.... Could you let me know your secret of this? Many thanks, DJ
|
|
Post Reply | Page <123 |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |