lets say i make a file Services.php
<?php
$myGlobalVar='ranSTR';
function serv1($num)
{
//some processing...
return $num;
}
function serv2($num)
{
//some processing...
return $num;
}
?>
and i include it in some other file lets say myFile.php by
include "Services.php";
OR
require "Services.php";
- How can i call its functions in myFile.php
You can just call any of these functions. After the file is included, the functions will be placed in the global scope.
have you not tried:
From the doc:
Check out these two doc resources for more information on what you’re having trouble understanding: