This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// < ? php | |
// —————————————————————————————————————————————————————————————————————————— | |
# Just a PHP file to put on your local server (as I don't have enough memory) | |
$indicesServer = array('PHP_SELF', | |
'argv', | |
'argc', | |
'GATEWAY_INTERFACE', | |
'SERVER_ADDR', | |
'SERVER_NAME', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Array with the Teacher class's data | $teacher is the class instantiated | |
$teacher_Data = #array( | |
[ | |
'user_id' => $teacher->user_id, | |
'user_type' => $teacher->user_type, | |
'name' => $teacher->first_name . ' ' . $teacher->last_name, | |
'email_address' => $teacher->email_address | |
]; #); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL | E_STRICT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a line to a log file | |
* | |
* @param string $log destination of log file | |
* @param string $message message to log | |
* @return void | |
*/ | |
function writeLog( $log , $message ) { | |
if (! file_exists( $log ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------ | |
echo '--- check 1 ---------------------------------------' . "\n"; | |
# DEBUG ------------------------------------------------------------ | |
var_dump($something); | |
# ------------------------------------------------------------------ | |
echo '---------------------------------------------------' . "\n"; | |
# ------------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function autoloader($class) | |
{ | |
include_once 'classes/' . strtolower($class) . '.php'; | |
} | |
spl_autoload_register(autoloader); | |
// http://goo.gl/8xmrcx | |
// http://goo.gl/bHXxrX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder