This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apache_setenv('downgrade-1.0','true'); | |
apache_setenv('force-response-1.0','true'); | |
ini_set('output_buffering', 'off'); | |
while( @ob_end_flush() ); | |
ini_set('implicit_flush', true); | |
flush(); | |
echo "sending"; | |
flush(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tempFile = tmpfile(); | |
$tempFileMetaData = stream_get_meta_data( $tempFile ); | |
fwrite($tempFile, $string); | |
// path of the temp file | |
$tempFileMetaData['uri']; | |
// deletes the tmp file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function translate( $key, $arguments = array()) { | |
$extensionName = $this->request->getControllerExtensionName(); | |
return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, $extensionName, $arguments); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function shelli($command){ | |
$ouput = []; | |
$return = ''; | |
exec($command, $output, $return); | |
echo "<hr><hr>\n"; | |
echo "Executing \"$command\" with return value \"$return\".\n"; | |
echo "<hr><pre>\n" . implode($output, "\n") . "</pre><hr><hr>\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$debug_backtrace = debug_backtrace(); | |
$output = []; | |
foreach ($debug_backtrace as $debug) { | |
if (isset($debug['class'])) { | |
$o = $debug['class']; | |
} | |
$o .= '::' . $debug['function']; | |
NewerOlder