Go to the source code of this file.
Function Documentation
| common_error_message_processing |
( |
|
$Visualisation, |
|
|
|
$e |
|
) |
| |
Function processes execution errors.
- Parameters
-
| $Visualisation | - Should the trace info be outputted. |
| $e | - Exception object. |
- Returns
- HTML content of the error message.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 243 of file startup.php.
{
try
{
$ErrorTemplate = file_get_contents( dirname( __FILE__ ).'/../../res/templates/exception.tpl' );
$DownloadLinkTemplate = file_get_contents( dirname( __FILE__ ).'/../../res/templates/download_link.tpl' );
$ErrorTemplate = str_replace( '{exception_message}' , $e->getMessage() , $ErrorTemplate );
if( $Visualisation )
{
print( str_replace( '{download}' , $DownloadLinkTemplate , $ErrorTemplate ) );
}
return( $ErrorTemplate );
}
catch( Exception $e )
{
}
}
Function processes tasks.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 201 of file startup.php.
{
try
{
$Schedule =
get_package(
'schedule' ,
'last' , __FILE__ );
$Schedule->process_tasks();
}
catch( Exception $e )
{
}
}
| handle_script_error |
( |
|
$Visualisation, |
|
|
|
$e |
|
) |
| |
Function processes execution errors.
- Parameters
-
| $Visualisation | - Should the trace info be outputted. |
| $e | - Exception object. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 319 of file startup.php.
{
try
{
if( $DEBUG )
{
$Handle = fopen( dirname( __FILE__ ).'/../../log/exception.log' , 'at' );
fwrite( $Handle , $e->getMessage().'<hr width="90%">' );
fclose( $Handle );
$Handle = fopen( dirname( __FILE__ ).'/../../log/exception.last.html' , 'wt' );
fwrite( $Handle , str_replace( '{download}' , '' , $ErrorTemplate ) );
fclose( $Handle );
}
}
catch( Exception $e )
{
}
}
Function generates page.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 166 of file startup.php.
{
try
{
$PageComposer =
get_package(
'page::page_composer' ,
'last' , __FILE__ );
if( isset( $_GET[ 'page_name' ] ) === false )
{
$_GET[ 'page_name' ] = 'index';
}
print( $PageComposer->get_page( $_GET[ 'page_name' ] ) );
}
catch( Exception $e )
{
}
}
Function prepares script for the main processing.
- Author
- Dodonov A.A.
Definition at line 64 of file startup.php.
{
try
{
$Settings->load_file( './cf_settings' );
$Settings->define(
'HTTP_HOST' ,
rtrim( 'http://'.$_SERVER[ 'SERVER_NAME' ].dirname( $_SERVER[ 'REQUEST_URI' ].'a' ) , '/\\' )
);
$Settings->define( 'SERVER_NAME' , $_SERVER[ 'SERVER_NAME' ] );
$Settings->define( 'DOMAIN' , $_SERVER[ 'HTTP_HOST' ] );
$Settings->set_setting( 'GZIP_TRAFFIC' , $Settings->get_setting( 'GZIP_TRAFFIC' , 'true' ) == 'true' );
$Settings->define( 'GZIP_TRAFFIC' );
}
catch( Exception $e )
{
}
}
Function sets session parameters.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 33 of file startup.php.
{
try
{
$Settings =
get_package(
'settings::package_settings' ,
'last::last' , __FILE__ );
$SessionTimeout = $Settings->get_package_setting(
'core_data' , 'last' , 'cf_system' , 'session_timeout' , 600
);
ini_set( 'session.gc_maxlifetime' , $SessionTimeout );
ini_set( 'session.cookie_lifetime' , $SessionTimeout );
ini_set( 'session.save_path' , './packages/_core_data/data/session/' );
}
catch( Exception $e )
{
}
}
Function starts page generation.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 131 of file startup.php.
{
try
{
$_GET[ 'page_name' ] = basename( $_SERVER[ 'SCRIPT_NAME' ] , ".php" );
}
catch( Exception $e )
{
}
}
| start_script_settings |
( |
| ) |
|
Settings.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 100 of file startup.php.
{
try
{
global $StartGenerationTime;
$StartGenerationTime = microtime( true );
}
catch( Exception $e )
{
}
}
| zip_exception |
( |
|
$ErrorMessage | ) |
|
Function processes execution errors.
- Parameters
-
| $ErrorMessage | - Error message. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 282 of file startup.php.
{
try
{
@unlink( dirname( __FILE__ ).'/../../log/exception.last.zip' );
$zip = new ZipArchive();
$zip->open( dirname( __FILE__ ).'/../../log/exception.last.zip' , ZIPARCHIVE::CREATE );
$zip->addFromString( 'exception.html' , str_replace( '{download}' , '' , $ErrorMessage ) );
}
catch( Exception $e )
{
}
}