I am having difficulty / problem to request a function in PHP:
Home
This function below is located in a class inside the lib folder.
Language.php
<?php
namespace app\lib;
class Language {
public function setLingCookie(){
if(isset($linguagem)){
setcookie("IDIOMA", $linguagem, time()+3600, "/", "localhost/");
echo 1;
}else{
echo 0;
}
}
.
.
.
}
My difficulty is to trigger this function through my page, and I will trigger this from a Link.
Home
I am using the Composer and I am using the Composer / em> only for Autoload .