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

[QUOTE=zlotyx;35041]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[/QUOTE]

Just go to Application->Libraries and mark it.

it works
thx