Karamellwuerfel Posted June 16, 2020 Report Share Posted June 16, 2020 Hey, does anyone know how to add external Classes to phpvms? I tried to add the folder to the core/common/ folder so it looks like this: Now I want to use this Classes and files in - for example "edit_profile". I added the required files with "require" like this: require __DIR__.'/../../../core/common/elephant.io/Client.php'; require __DIR__.'/../../../core/common/elephant.io/Engine/SocketIO/Version2X.php'; Now, if I refresh the page I got an 500 error (HTTP ERROR 500). How do I include and use the files correctly? Thank you Quote Link to comment Share on other sites More sharing options...
Strider Posted June 17, 2020 Report Share Posted June 17, 2020 I think you will have to make some edits, and possibly create classes using the same method the other classes use. Quote Link to comment Share on other sites More sharing options...
PikoSim Posted June 17, 2020 Report Share Posted June 17, 2020 Hi @Karamellwuerfel One of the ways you can access your external class is by putting this codes that have made for you in your codon.config Make a new define to your folder elephant.io 1. define('ELEPHANTIO_PATH', dirname(__FILE__).'\core\common\elephant.io'); 2. require ELEPHANTIO_PATH.DS.'client.php'; Do the same for version2x.php That should be it. Do let me know if it works for you. 1 Quote Link to comment 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.