I have a simple PHP structure.
In admin_keys.php i have:
<?php
class admin_keys
{
public $key;
private $arr_keys = array("1", "2", "3");
public function check_key_admin()
{
if(in_array($this->key,$this->$arr_keys))
{
return true;
}else
{
return false;
}
}
}
?>
In ok.php i have:
<?php
include_once '../../all_keys.php';
$admin_keys = new admin_keys();
$admin_keys->key = "vailozluon";
$_isAdmin = $admin_keys->check_key();
if( _isAdmin== false)
{
echo 'deo phai';
}else { echo 'ok';}
?>
Im new so just bear with me I don't know why this is return Uncaught Error: Call to undefined method admin_keys::check_key any help will be appreciated.
thanks!
check_key_admin!=check_key.