Announcement

Collapse
No announcement yet.

sc_include problem

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

  • sc_include problem

    Hello

    I have problem with including own functions.

    I create in library public file
    echo_test.php - test

    0| <?php
    1|
    2| function echo_aa($abc) {
    3|
    4| echo $abc."!";
    5|
    6| }
    7|
    8| ?>

    and on grid in onapplicationinit
    sc_include(echo_test.php);
    echo_aa('aaabbb');

    but I got
    Fatal error: Call to undefined function echo_aa() in /opt/NetMake/v8/wwwroot/scriptcas....

    when I change it to
    sc_include(echo_test.php);
    echo('aaabbb');
    it works

    I also try to put in sc_include(echo_teaast.php) not existing filename but stil sc_inlclude didn't return any error.
    I also try sc_include('echo_test.php'); - the same result.

    What I should do? It looks that project don't load this file but sc_include don't return any info about success or error. Any ideas?

    --------------
    I've found that works
    include('/opt/NetMake/v8/wwwroot/scriptcase/devel/conf/sys/lib/echo_test.php');
    echo_aa('aaabbb');

    but how I can use sc_include instead?
    Thx
    Last edited by zlotyx; 03-29-2015, 05:49 AM.

  • #2
    Originally posted by zlotyx View Post
    Hello

    I have problem with including own functions.

    I create in library public file
    echo_test.php - test

    0| <?php
    1|
    2| function echo_aa($abc) {
    3|
    4| echo $abc."!";
    5|
    6| }
    7|
    8| ?>

    and on grid in onapplicationinit
    sc_include(echo_test.php);
    echo_aa('aaabbb');

    but I got
    Fatal error: Call to undefined function echo_aa() in /opt/NetMake/v8/wwwroot/scriptcas....

    when I change it to
    sc_include(echo_test.php);
    echo('aaabbb');
    it works

    I also try to put in sc_include(echo_teaast.php) not existing filename but stil sc_inlclude didn't return any error.
    I also try sc_include('echo_test.php'); - the same result.

    What I should do? It looks that project don't load this file but sc_include don't return any info about success or error. Any ideas?

    --------------
    I've found that works
    include('/opt/NetMake/v8/wwwroot/scriptcase/devel/conf/sys/lib/echo_test.php');
    echo_aa('aaabbb');

    but how I can use sc_include instead?
    Thx


    Just go to Application->Libraries and mark it.
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      it works
      thx

      Comment

      Working...
      X