using new macro library for public library

Hello to all.

I’m testing the new macro vers. 8.1.002 relating to the libraries : sc_url_library and sc_include_library

I create a public library ‘new_lib’ with the file inside func1.php:


<?php
function sum($a, $b) {
return ($a + $b);
}
?>

In onevent of blank application using the library:


echo "--->". sc_url_library("scriptcase", "new_lib", "func1.php")."<br />";
sc_include_library ("scriptcase", "new_lib", "func1.php", true, true);
echo "add1 = ".add1(3, 4);

does not work. Here is the error:
—> …/_lib/libraries/scriptcase/new_lib/func1.php
Error
require_once (…/_lib/libraries/scriptcase/new_lib/func1.php): failed to open stream: No such file or directory
Fatal error: require_once (): Failed opening required ‘…/_lib/libraries/scriptcase/new_lib/func1.php’ (include_path = ‘.; C:\php\pear’) in C:\php\NetMake\v8\wwwroot\scriptcase\app est_lib\lib\php
m_functions.php on line 196

In fact in ‘…/_lib/libraries’ there is a folder ‘scriptcase’, but inside there is nothing!

Where am I wrong?

Use the same procedure for a library belonging to the project and working properly:


echo "--->". sc_url_library("prj", "new_lib_prj", "func_prj.php"). "<br />";
sc_include_library("prj", "new_lib_prj", "func_prj.php", true, true);
echo "Fxxx = ".fxxx(3, 4);

Thank You
Hello
Enrico

Hi,

Before to use, tou need “Save the project libraries” in the Libraries menu.

thanks for the reply.
Yes, both libraries were 'Save the project libraries ": public and project.
I do not know what else can be.
hello
enrico

ummm, Now my scriptcase is down, I’ll try to help when is restored!

Try using “prj” instead “scriptcase” as first param

thank you Giu
with ‘prj’ work correctly if the library belongs to the project, but, as I understand it, that to me does not incorporate is the public library.
ciao
enrico

[QUOTE=henry1311;39246]thank you Giu
with ‘prj’ work correctly if the library belongs to the project, but, as I understand it, that to me does not incorporate is the public library.
ciao
enrico[/QUOTE]

Sorry, didn’t readed you tried it.