PHP Classes

File: bootstrap.php

Recommend this page to a friend!
  Classes of Tomas Pavlatka   PHP Snake Game   bootstrap.php   Download  
File: bootstrap.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Snake Game
Manage and process the moves in a snake game
Author: By
Last change: Update of bootstrap.php
Date: 5 days ago
Size: 356 bytes
 

Contents

Class file image Download
<?php

spl_autoload_register
('__autoload');
function
__autoload($class_name) {
   
$namespace = null;
    if(
strstr($class_name, '\\')) {
        list(
$namespace, $class_name) = explode('\\', $class_name);
    }

    require_once
'./classes/' . $class_name . '.php';
}

function
debug($data) {
    echo
'<pre>';
       
print_r($data);
    echo
'</pre>';
}