<?php # This has to be the FIRST line! Show $stripFirstPhpOpenLine in executeCaller.php
# All in the next rows the is only a example. Do her, what you have to do!
/*
* Configuration:
*/
$deleteFile = true; #delete the temporary File after execution? Set FALSE for debugging.
$to = "fastix@localhost"; # Often you want to use the mailaddress from the user, given via formular ($_POST, $_GET).
$subject = "alone executed";
/*
* This is only a DEMONSTRATION how to handle the data. Show to executeCaller.php how export the vars.
*/
ob_start(); # save all output to a buffer!
#
if ( ! false == strpos( __FILE__, 'executeAlone.php' ) ) {
trigger_error ( "Dieses Skript sollte nicht direkt aufgerufen werden!", E_USER_ERROR );
}
echo "Data:\n=====\n\n";
if ( isset( $_SESSION ) ) {
# this is only for the mail:
echo '$_SESSION = ' . var_export( $_SESSION, true ) . "\n\n";
}
# this is only for the mail:
echo '$_ENV = ' . var_export( $_ENV, true ) . "\n\n";
}
if ( isset( $_SERVER ) ) {
# this is only for the mail:
echo '$_SERVER = ' . var_export( $_SERVER, true ) . "\n\n";
}
# this is only for the mail:
echo '$_GET = ' . var_export( $_GET, true ) . "\n\n";
}
# this is only for the mail:
echo '$_POST = ' . var_export( $_POST, true) . "\n\n";
}
if ( isset( $_COOKIE ) ) {
#
# You have to know, that you DON'T can send cookies to the Browser!
#
# this is only for the mail:
echo '$_COOKIE = ' . var_export( $_COOKIE, true ) . "\n\n";
}
}
}
# Now you can send all output to the given emailaddress:
# This can delete the file after executing
if ( $deleteFile && ( false === strpos(__FILE__, 'executeAlone.php' ) ) ) {
}