Jump to content

Recommended Posts

Posted

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:

CSnKNYV.png

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 :) 

Posted

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.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...