Libary PHP-script

I made a PHP-script outside SC.
Uploaded it to SC-libary as public
Did the include in the form event “applicationoninit” with “sc_include(my_script.php);”
But how to use it i.e. in a button or in an other event.
I have realy no idea.
I did not found it in the manual and in the forum. Please give me a hint.

Regards, Bert

Once included you can use it in your button. Example if it’s a class, or has a method you need, you can call it directly on you’re button

Hi Giu

Still have no idea how.
Example in a button -> script in PHP. Can I write:

my_script();

or

call my_script.php

I have no idea.

Bert

You can use include_once to get it on board. Then you can use it as you should expect. So if you have a function x($i) you can call it like x($i). If you have trouble then you have always the option to put your code into a library. Then this library will always be a part of your project and uploaded with your deployment.

Hi Albert,

Yes, I did realize, but calling the embedded function in the included php is the way…thanks

Bert