public function actionMigrate()
{
// Keep current application
$oldApp = \Yii::$app;
// Load Console Application config
$config = require \Yii::getAlias('@app'). '/config/console.php';
new \yii\console\Application($config);
$result = \Yii::$app->runAction('migrate', ['migrationPath' => '@app/migrations/', 'interactive' => false]);
// Revert application
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 | |
$startTime = time(); | |
$runSeconds = 5; | |
$rounds = 5; | |
$count = 0; | |
for ($i=0; $i<$rounds; $i++) { | |
while ((time()-$startTime) <= $runSeconds) { | |
serialize(['bar'=>'foo']); | |
$count ++; |
Yii2 Mailer is extended by yii-mail-basemailer, which the compose()
would render an mail view with default layout.
[
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
If the target month is smaller than the original month, the extra days will be discarded.
/**
* Shift a giving months from your input datetime with month based
*
* If the target month is smaller than the original month, the extra days will be discarded.
*
Diffie–Hellman key exchange - Practical attacks on Internet traffic
$ openssl dhparam -out dhparams.pem 2048
OlderNewer