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