Announcement

Collapse
No announcement yet.

using new macro library for public library

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

  • 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:
    Code:
    <?php
    function sum($a, $b) {
    return ($a + $b);
    }
    ?>
    In onevent of blank application using the library:

    PHP Code:
    echo "--->"sc_url_library("scriptcase""new_lib""func1.php")."<br />";
    sc_include_library ("scriptcase""new_lib""func1.php"truetrue);
    echo 
    "add1 = ".add1(34); 
    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\test\_lib \lib\php\nm_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:

    PHP Code:
    echo "--->"sc_url_library("prj""new_lib_prj""func_prj.php"). "<br />";
    sc_include_library("prj""new_lib_prj""func_prj.php"truetrue);
    echo 
    "Fxxx = ".fxxx(34); 
    Thank You
    Hello
    Enrico

  • #2
    Hi,

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

    Comment


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

      Comment


      • #4
        ummm, Now my scriptcase is down, I'll try to help when is restored!

        Comment


        • #5
          Try using "prj" instead "scriptcase" as first param
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


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

            Comment


            • #7
              Originally posted by henry1311 View Post
              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
              Sorry, didn't readed you tried it.
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment

              Working...
              X