Changeset 625

Show
Ignore:
Timestamp:
04/25/07 08:53:49 (1 year ago)
Author:
schst
Message:

highlight_file() does output the HTML, no need to echo here...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/foreignClassLoaders/index.php

    r622 r625  
    11<?php 
    22echo 'The PHP code:<br />'; 
    3 echo highlight_file(__FILE__); 
     3highlight_file(__FILE__); 
    44 
    55require '../../config/php/config.php'; 
  • trunk/examples/logging/index.php

    r623 r625  
    11<?php 
    22echo 'The PHP code:<br />'; 
    3 echo highlight_file(__FILE__); 
     3highlight_file(__FILE__); 
    44 
    55require '../../config/php/config.php'; 
     
    1414    { 
    1515        // initialize logger from configuration 
    16         // in a default application using the  
    17         // net.stubbles.websites.stubFrontController this can be done via the  
     16        // in a default application using the 
     17        // net.stubbles.websites.stubFrontController this can be done via the 
    1818        // net.stubbles.util.log.stubLogPreInterceptor 
    1919        $loggerXJConfFactory = new stubLoggerXJConfFactory(); 
    2020        $loggerXJConfFactory->init(); 
    21          
    22         // both request and session normally are put into your application  
    23         // classes e.g. via stub(Pre|Post)Interceptor::(pre|post)process()  
     21 
     22        // both request and session normally are put into your application 
     23        // classes e.g. via stub(Pre|Post)Interceptor::(pre|post)process() 
    2424        // or via stubPageElement::(isAvailable|process)() 
    2525        $request = new stubWebRequest(); 
    2626        $session = new stubPHPSession($request, 'SID'); 
    27          
     27 
    2828        // now the real work for logging 
    29         // first we create a new logdata object with target trail and level  
     29        // first we create a new logdata object with target trail and level 
    3030        // info 
    31         // the type of the logdata object can be configured in  
     31        // the type of the logdata object can be configured in 
    3232        // config/xml/config.xml with the property net.stubbles.util.log.class 
    33         // if property not set an instance of  
     33        // if property not set an instance of 
    3434        // net.stubbles.util.log.stubBaseLogData will be created 
    3535        $logData = stubLogDataFactory::create($session, 'trail', stubLogger::LEVEL_INFO); 
    36          
     36 
    3737        // we add some more data that we want to log 
    3838        $logData->addData('logging/index.php'); 
    3939        $logData->addData('foo'); 
    40          
     40 
    4141        // and finally we send the logdata to all log appenders that listen for 
    4242        // the level of the logdata (in this case stubLogger::LEVEL_INFO) 
    4343        stubLogger::logToAll($logData); 
    44          
    45         // now take a look into the log directory, there should be a logfile  
     44 
     45        // now take a look into the log directory, there should be a logfile 
    4646        // named trail-Y-m-d.log containing the logdata 
    4747        // the contents are