Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional PHP Design Patterns
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional PHP Design Patterns
This is the forum to discuss the Wrox book Professional PHP Design Patterns by Aaron Saray ISBN: 978-0-470-49670-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP Design Patterns section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2010, 08:11 AM
Registered User
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to make code work with xampp?

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

Any ideas ?

= index.php =
require $_SERVER['DOCUMENT_ROOT'].'/xampp/contacts/includes/autoloader.php';
require $_SERVER['DOCUMENT_ROOT'] .'/xampp/contacts/includes/exceptions.php';

lib::setitem('controller', new controller($_GET['u']));

$view = new view();
$content = $view->finish();

echo view::show('shell', array('body'=>$content));

= autoloader.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');

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having trouble using HttpClient with JSP in XAMPP Mateo1041 JSP Basics 0 November 7th, 2008 03:24 PM
Code to make crystal viewer (10) work with access Charinator Access 0 November 16th, 2006 05:26 AM
How do I make this C# code work in ASP.NET? aowen355 ASP.NET 1.x and 2.0 Application Design 1 July 19th, 2005 01:00 PM
how to make it work? ashokparchuri ADO.NET 2 March 4th, 2005 07:00 AM

All times are GMT -4. The time now is 02:33 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.