Fatal error: Uncaught Error: Call to undefined function sc_lookup()

Hi,
I don’t know if it’s my fault but in my external library/menu02.html i use php with sc_lookup and i have this error :

  • Fatal error: Uncaught Error: Call to undefined function sc_lookup()
    this is my code in menu02.html. May be i have to include something.
<link rel="stylesheet" href="{SC_LIB_CURRENT}menu/css/menu02.css">
<link rel="stylesheet" href="{SC_LIB_CURRENT}libs/bootstrap/css/bootstrap.min.css">
<span class="glyphicon glyphicon-bell help-tip" aria-hidden="true">
<?php
//Get message from table
$check_sql = 'SELECT message FROM message';

sc_lookup(rs,$check_sql);

if (isset({rs[0][0]})) // Trouv?
{
    $glo_msg = {rs[0][0]};
}
else // No row found
{
    $glo_msg = 'Aucun message';
}
?>
{message}

any idea ?

thanks
Guy

in your external html menu you certainly do not document scriptcase,
if you test your routine in a blank document, you will see that it works very well, remembering,

?>
<link rel = “stylesheet” href = “{SC_LIB_CURRENT} menu / css / menu02.css”>
<link rel = “stylesheet” href = “{SC_LIB_CURRENT} libs / bootstrap / css / bootstrap.min.css”>
<span class = “glyphicon glyphicon-bell help-tip” aria-hidden = “true”>
<? php
$check_sql = “SELECT message FROM message”;

sc_lookup (rs, $check_sql);
if (isset ({rs [0] [0]})) // Found?
{
$glo_msg = {rs [0] [0]};
}
else // No row found
{
$glo_msg = ‘No message’;
}
///test
echo $glo_msg. ‘</br>’;

Hello,
Sure, that’s work with blank application but how can i do to work with menu02.html ?
thanks
Guy

Hello,
I included a blank application in menu02.html by “include •…php” and that’s work…in dev but in production, no errors but nothing is displayed.
check security, it’s ok
check path, it’s ok

any idea ?
thanks
Guy

Hello,
i explain more because i’m stuck
Code in menu02.html (in my external library)

<link rel="stylesheet" href="{SC_LIB_CURRENT}menu/css/menu02.css">
<link rel="stylesheet" href="{SC_LIB_CURRENT}libs/bootstrap/css/bootstrap.min.css">
<span class="glyphicon glyphicon-bell help-tip" aria-hidden="true">
<?php
//Get message from table
global $glo_msg;
include_once("..\message_notif\message_notif.php");
?>
    <p>    {message}    </p>

nothing display
if i replace include… by $glo_msg = “Test”;
display Test

for your information in dev, it works fine, in prod doesn’t work with no errors
mesage_notif.php is a blank application with just this code onexecute

//Get message from table
global $glo_msg;
$check_sql = 'SELECT message FROM message';
sc_lookup(rs,$check_sql);

if (isset({rs[0][0]})) // Trouv?
{
    $glo_msg = {rs[0][0]};
}
else // No row found
{
    $glo_msg = 'Aucun message';
}
return $glo_msg;

Anybody can help me ?
thanks
Guy

the problem may just come from the path, maybe we should try to check the path, I already had to check the path of my temporary files, and if, in the folder existed,
ex:
$dirpat = $_SERVER [‘DOCUMENT_ROOT’]. “/tmp”;
$dirtemp = “$dirpat / test”; // The name of the directory to create

 // Check if the directory exists:
 if (! (is_dir ($dirtemp))) {
       mkdir ($dirtemp);
       // echo 'The directory'.$name. ' has just been created! ';
       }

Hello,
why didn’t I think of it sooner? I check with your method and i found my error.

thaanks a lot. work’s fine now
Guy