jestem w tym klasy PHP zklasa PHP nie znaleziono, ale to jest wliczone
require_once($ENGINE."/classUser.php");
ale gdy kod jest wykonywany i otrzymać ten błąd:
Fatal error: Class 'User' not found in C:\xampp\htdocs\WebName\resources\engine\ajax\signup.php on line 12
ja wciąż nie mogę dowiedzieć się, jaki jest problem. Mam 99% pewności, że to prawda.
"$ ENGINE" jest poprawne, a klasa również jest poprawna (Netbeans sugeruje mi metody i zmienne klasy).
signup.php:
<?php
/* Created on: 13/12/2011
* Author:
*
* Description: User signup procedure.
*/
require_once("../settings.php");
require_once($ENGINE."/classUser.php");
$user = new User();
$user->createUser($_POST["username"], $_POST["email"], $_POST["password"]);
?>
classUser.php:
<?php
/* Created on: 13/12/2011
* Author:
*
* Description: This class manages users.
*/
require_once("settings.php");
require_once($LIBRARY."/cassandraphp/cassandra.php");
class User {
public function createUser($username, $email, $password){
$cassandra = Cassandra::createInstance($CASSANDRASERVER);
$cassandra->set(
"user.".$username,
array(
'ID' => uniqid(),
'Username' => $username,
'Email' => $email,
'Password' => $password
)
);
}
}
?>
mam żadnych wskazówek – ajreal