Changeset 27 for php/trunk/rdfa.php
- Timestamp:
- Jul 13, 2011, 1:46:00 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
php/trunk/rdfa.php
r2 r27 18 18 */ 19 19 20 // --- load ARC21 if (!defined( 'ARC2'))22 die( 'error: ARC2 not defined !');23 require_once( ARC2.'/ARC2.php');24 25 // --- load and initialize fDebug26 // if not defined, load dummy class27 if (defined( 'fDebug'))28 require_once( fDebug.'/server/php/fdebug.lib.php');29 else30 require_once( RDFINT.'/classes/fdebug.php');31 32 20 // --- load classes of this library 33 if(!defined('RDFINT')) 34 die( 'error: RDFINT not defined !'); 21 if (!defined( 'RDFINT')) 22 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 23 if (RDFINT == '') 24 die( 'error: environment variable PHP_LIBROOT_RDFINT not defined !'); 35 25 require_once( RDFINT.'/classes/rdfa_Data.php'); 36 26 require_once( RDFINT.'/classes/rdfa_Projection.php'); … … 38 28 require_once( RDFINT.'/classes/rdfa_SparqlQuery.php'); 39 29 30 // --- load ARC 31 define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2')); 32 if( ARC2 == '') 33 die( 'error:environment variable PHP_LIBROOT_ARC2 not defined !'); 34 require_once( ARC2.'/ARC2.php'); 35 36 // --- load fDebug 37 define( 'fDebug', getenv( 'PHP_LIBROOT_FDEBUG')); 38 $locationStub = RDFINT.'/classes/fdebug.php'; 39 $locationLib1 = fDebug.'/server/php/fdebug.lib.php'; 40 $locationLib2 = fDebug.'/fdebug.lib.php'; 41 if (fDebug == '') { 42 $location = $locationStub; 43 } else { 44 $location = $locationLib1; 45 if (!file_exists( $location)) 46 $location = locationLib2; 47 if (!file_exists( $location)) 48 $location = $locationStub; 49 } 50 require_once( $location); 51 52 // --- configure fDebug 53 $fdebug = \fDebug::getInstance(); 54 If (isset( $_SERVER[ "SERVER_NAME"])) 55 $fdebug->setSession( $_SERVER[ "SERVER_NAME"]); 56 else { 57 $unittest_name = str_replace( '_', ' ', basename( getcwd())); 58 if (defined( 'SAMPLE_NAME')) 59 $fdebug->setSession( 'localhost', SAMPLE_NAME . ' ' . $unittest_name); 60 } 61 $fdebug->openSocket( '127.0.0.1'); 62 $fdebug->sendSource( '<?xml version="1.0" ?><emptysource/>'); 40 63 41 64 ?>
Note:
See TracChangeset
for help on using the changeset viewer.