rajeshkumarvm Posted October 11, 2007 Share Posted October 11, 2007 Hi i am new born child for php.My dbconnect.php having username and password for connect with mysql server.I want to make something but it wont preview the details to third person.Then i think to make this dll function.I am also welcome for any other methods like password encryption and decryption method with clear details.So anyone tell me how to make dll and how to connect the php pages and any other methods also.I am waiting for yor reply. Quote Link to comment https://forums.phpfreaks.com/topic/72719-dll-in-php/ Share on other sites More sharing options...
cooldude832 Posted October 11, 2007 Share Posted October 11, 2007 I like making a file of well used constants that I set chmods on to execute only such as define("ROOT",$_SERVER['DOCUMENT_ROOT']."/redesign/"); define("BASE", "/redesign/"); define("SCRIPTS", ROOT."scripts/"); define("SUB_FOLDER", BASE."source/"); define("GRAPHICS", BASE."graphics/"); define("SOURCES", BASE."sources/"); define("IMAGES", BASE."images/"); define("CSS", BASE."css/"); define("EXT", ".php"); //SQL DB INFO HERE define("SQL_PORT", "localhost"); define("SQL_USER", ""); define("SQL_PASS", ""); define("SQL_DB", ""); ?> The top ones are for linking purposes the Root is for includes and the Base is for anchors/image src. The rest are pretty much self explanatory. You could 2 way encrypt all this and decrypt on use, but that requires mCrypt which is over kill in my eyes. If the file can only be executed than it can't be viewed. Quote Link to comment https://forums.phpfreaks.com/topic/72719-dll-in-php/#findComment-366756 Share on other sites More sharing options...
rajeshkumarvm Posted October 11, 2007 Author Share Posted October 11, 2007 Thank you for your kind reply.Can u explain how i implement in this code to the correct page with step by step process.....plz....? Quote Link to comment https://forums.phpfreaks.com/topic/72719-dll-in-php/#findComment-366815 Share on other sites More sharing options...
cooldude832 Posted October 11, 2007 Share Posted October 11, 2007 you just put it in your root directory, then on every single page the first line you have is require_once("./constants.php"); or if in the root already require_once("constants.php"); that is how I do it and I don't have any issues. Quote Link to comment https://forums.phpfreaks.com/topic/72719-dll-in-php/#findComment-367101 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.