PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of John Wetsell   Add to Google Calendar   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: A simple example
Class: Add to Google Calendar
Generate links to add events to Google Calendar
Author: By
Last change: Update of test.php
Date: 6 months ago
Size: 921 bytes
 

Contents

Class file image Download
<?php
error_reporting
(E_ALL ^ E_NOTICE);
if (!isset(
$_SERVER['DOCUMENT_ROOT'])) {
   
$_SERVER['DOCUMENT_ROOT'] = substr($_SERVER['SCRIPT_FILENAME'], 0, -strlen($_SERVER['SCRIPT_NAME']));
}
define("APP_PATH",$_SERVER['DOCUMENT_ROOT'].'/');
require(
APP_PATH . '_classes/Autoloader.class.php');
Autoloader::setCacheFilePath(APP_PATH . 'tmp/class_path_cache.txt');
Autoloader::excludeFolderNamesMatchingRegex('/^CVS|\..*$/');
Autoloader::setClassPaths(array(
   
APP_PATH . '_classes/',
));
spl_autoload_register(array('Autoloader', 'loadClass'));


echo
"<pre>";
$params = array('title' => 'New Years Celebration',
       
'datetime' => array('start' => '2012-12-31 20:00', 'end' => '2013-01-01 02:00'),
       
'location' => 'Lake House',
       
'description' => 'Come celebrate New Years with Bert and Ernie.'
   
);
$link =
$gCal = GoogleCalendar::createEventReminder($params);
echo
" $link ";