Answer the question
In order to leave comments, you need to log in
Why doesn't it see RedBeanPHP classes?
I'm trying to use the methods of the R class in my class, but PHP knows nothing about this class and gives the following error:
Fatal error: Uncaught Error: Class 'Accounts\R' not found in E:\servak\OSPanel\domains\diplo.me\ public\accounts.php:11
Here is the piece of code where I am trying to use RedBean
namespace Accounts;
require 'E:\servak\OSPanel\domains\diplo.me\include.php'; //тут подключён файл с RedBeanPHP
include_once '../helper.php';
use RedBeanPHP; //пространство имён даже попытался указать
class Account
{
public static function getEmployee()
{
$employee = R::FindOne('employees', 'WHERE user_id = ?', array($_SESSION['user_id']));
b_dump($employee);
return $employee;
}
Answer the question
In order to leave comments, you need to log in
use RedBeanPHP; //namespace even tried to specify
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question