Hi,
I was wondering is anyone managed to get the sample application working with xampp.
My xampp is in c:\xampp
I copied the contatcs folder to c:\xampp\htdocs\xampp\contacts and modified the following 2 files (see below).
but now it is looking for
http://127.0.0.1/login
Any ideas ?
= index.php =
<?php
require $_SERVER['DOCUMENT_ROOT'].'/xampp/contacts/includes/autoloader.php';
require $_SERVER['DOCUMENT_ROOT'] .'/xampp/contacts/includes/exceptions.php';
session_start();
lib::setitem('controller', new controller($_GET['u']));
$view = new view();
lib::getitem('controller')->render();
$content = $view->finish();
echo view::show('shell', array('body'=>$content));
= autoloader.php =
<?php
class autoloader
{
public static function moduleautoloader($class)
{
$path = $_SERVER['DOCUMENT_ROOT'] . "/xampp/contacts/modules/{$class}.php";
if (is_readable($path)) require $path;
}
public static function daoautoloader($class)
{
$path = $_SERVER['DOCUMENT_ROOT'] . "/xampp/contacts/dataobjects/{$class}.php";
if (is_readable($path)) require $path;
}
public static function includesautoloader($class)
{
$path = $_SERVER['DOCUMENT_ROOT'] . "/xampp/contacts/includes/{$class}.php";
if (is_readable($path)) require $path;
}
}
spl_autoload_register('autoloader::includesautoloa der');
spl_autoload_register('autoloader::daoautoloader') ;
spl_autoload_register('autoloader::moduleautoloade r');
?>