Wyrzuca mi takie błędy
Warning: include(models/m_template.php): failed to open stream: No such file or directory in C:\xampp2\htdocs\sk_login\includes\init.php on line 3
Warning: include(): Failed opening 'models/m_template.php' for inclusion (include_path='.;C:\xampp2\php\PEAR') in C:\xampp2\htdocs\sk_login\includes\init.php on line 3
Warning: include(models/m_auth.php): failed to open stream: No such file or directory in C:\xampp2\htdocs\sk_login\includes\init.php on line 4
Warning: include(): Failed opening 'models/m_auth.php' for inclusion (include_path='.;C:\xampp2\php\PEAR') in C:\xampp2\htdocs\sk_login\includes\init.php on line 4
kod pliku w którym one są
<?php
include('models/m_template.php');
include('models/m_auth.php');
$Template = new Template();
$Template->setAlertTypes(array('success','warning','danger'));
$Auth = new Auth;
session_start();
kody tych podpiętych plików
<?php
class Template{
private $data;
private $alertTypes;
function __construct(){
}
function load($url){
include($url);
}
function redirect($url){
header("Location: $url");
}
function setData($name,$value){
$this->data[$name] = htmlentities($value, ENT_QUOTES);
}
function setAlertTypes($types){
$this->setAlertTypes = $types;
}
function setAlert($value, $type = null){
if($type == ''){
$type = $this->alertTypes[0];
}
$_SESSION[$type][] = $value;
}
function getAlerts(){
$data = '';
foreach($this->setAlertTypes as $alert){
if(isset($_SESSION[$alert])){
foreach($_SESSION[$alert] as $value){
$data .= '<li class="alert alert-' . $alert . '">' . $value . '</li>';
}
unset($_SESSION[$alert]);
}
}
return $data;
}
function getData($name){
if(isset($this->data[$name])){
return $this->data[$name];
}else{
return '';
}
}
}
i drugi
<?php
class Auth{
private $salt = 'DSAHGgdsayhgdsayudGDHSAJGDhsa$#@$#@$@#1';
function __construct(){
}
function ValidateLogin($user, $pass){
global $Database;
if($stmt = $Database ->prepare("SELECT * FROM users WHERE username = ? AND password = ?")){
$stmt->bind_param('ss', $user, md5($pass.$this->salt));
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows > 0){
$stmt->close();
return TRUE;
}else{
$stmt->close();
return FALSE;
}
}else{
die();
}
}
function checkLoginStatus(){
if(isset($_SESSION['loggedin'])){
return TRUE;
}else{
return FALSE;
}
}
function logout(){
session_destroy();
session_start();
}
}
jest to kurs ze strony strefa kursów i wszystko było robione dokładnie tak samo a mimo to takie coś