Announcement

Collapse
No announcement yet.

Libary PHP-script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      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

      Comment


      • #4
        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.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Hi Albert,

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

          Bert

          Comment

          Working...
          X