Renidrag Posted March 20, 2013 Share Posted March 20, 2013 I use Dreamweaver as my IDE for development, something i have always found to be a pain but haven't had much time to look into is the best way to include or require a file in other directories and have the intellasense still work for custom classes and then to add a bit more these files that have the include or require code are also in files that sit in the root and have them as include or require - so i just set up a define ROOT but then I loose all intellasense which comes in very handy when working with a large amount of custom classes and their functions / methods any solutions to this include or require relative or absolute working in multiple includes throughout a site? Looking for thoughts, thanks Quote Link to comment https://forums.phpfreaks.com/topic/275930-php-include-relative-or-absolute-path/ Share on other sites More sharing options...
davidannis Posted March 20, 2013 Share Posted March 20, 2013 Not sure about Dreamweaver, but I have a convention of having three servers dev.mydomain.com, test.mydomain.com, and the live server. I include a config.php that looks at the URL and defines paths, directories, database connections, etc. for each environment. Quote Link to comment https://forums.phpfreaks.com/topic/275930-php-include-relative-or-absolute-path/#findComment-1419964 Share on other sites More sharing options...
Renidrag Posted March 21, 2013 Author Share Posted March 21, 2013 Thanks davidannis for your reply, I use a config.php file also, everything works fine with my define paths, the sites always work fine, I guess I am just trying to seek out a way to have intellasense work correctly in Dreamweaver when you got /pageA.php in the root with /include/pageB.php included in /pageA.php and /classes/pageC.php included into pageB.php so that is: define Root = dirname(__FILE__); In /pageA.php -> include(ROOT . "/include/pageB.php"); In /pageB.php -> include(ROOT . "/classes/pageC.php"); All works fine on the server and includes the pages - but in dreamweaver, in order for intellasense to work, the above include will not work to show the class and its methods as you type/create the code -> they need a relitive path without the var ROOT as this doesn't get defined until runtime on the server Just wondering if anyone knows a work around for this or something that can be defined in Dreamweaver, Any thoughts on the best IDE with intellasense like this and a good all around solution for creating sites - I am going to check out a few and a few pointers in that direction would be good too, going to check out Aptana Studio 3 and see what that offers again, any thoughts would be great Quote Link to comment https://forums.phpfreaks.com/topic/275930-php-include-relative-or-absolute-path/#findComment-1419973 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.