We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Absolute Paths

Development and Programming

TrevorScott's avatar
TrevorScott
19 posts
about 16 years ago
TrevorScott's avatar TrevorScott

Is there an absolute path reference I can use? My module-in-development is using 3 classes. The expected class, an “author” class, and a super admin class. Rather than coding all 3 classes into the same file, it would be super-handy to split them into their respective files.

Example:

include(_EE_ABS_PATH . 'system/modules/friends/aux.friendClassOne.php');
include(_EE_ABS_PATH . 'system/modules/friends/aux.friendClassTwo.php');

Thank You! 😊

       
TrevorScott's avatar
TrevorScott
19 posts
about 16 years ago
TrevorScott's avatar TrevorScott

I found a solution on my own. It may not work for everyone, but it is working for me.

$pathinfo = pathinfo(__FILE__);
include($pathinfo['dirname'] . DIRECTORY_SEPARATOR . 'aux_admin.php');
include($pathinfo['dirname'] . DIRECTORY_SEPARATOR . 'aux_center.php');
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.