PHP code example of karelwintersky / steamboatengine
1. Go to this page and download the library: Download karelwintersky/steamboatengine library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
karelwintersky / steamboatengine example snippets
new \SteamBoat\MySQLWrapper($config, $pdo_connector, $logger = null);
public static function redirectCode(string $uri, bool $replace_prev_headers = false, int $code = 302)
{
// Функция редиректа с принудительной отсылкой заголовка
// see also https://gist.github.com/phoenixg/5326222
$scheme = (self::is_ssl() ? "https://" : "http://");
$code = array_key_exists($code, self::HTTP_CODES) ? self::HTTP_CODES[$code] : self::HTTP_CODES[302]; /// <---- ADD THIS
header($code);
if (strstr($uri, "http://") or strstr($uri, "https://")) {
header("Location: " . $uri, $replace_prev_headers, $code);
} else {
header("Location: {$scheme}" . $_SERVER['HTTP_HOST'] . $uri, $replace_prev_headers, $code);
}
exit(0);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.