Permalink
Browse files

Add another php script sample

  • Loading branch information...
1 parent b71cab6 commit 4fb910533f2107d785d21c355c6f75c2f66868a3 @tnm tnm committed Jul 20, 2013
Showing with 22 additions and 0 deletions.
  1. +22 −0 samples/PHP/php2.script!
View
@@ -0,0 +1,22 @@
+#!/usr/bin/env php
+<?php
+/**
+ * Yii console bootstrap file.
+ *
+ * @link http://www.yiiframework.com/
+ * @copyright Copyright (c) 2008 Yii Software LLC
+ * @license http://www.yiiframework.com/license/
+ */
+
+defined('YII_DEBUG') or define('YII_DEBUG', true);
+
+// fcgi doesn't have STDIN defined by default
+defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
+
+require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
+require(__DIR__ . '/vendor/autoload.php');
+
+$config = require(__DIR__ . '/config/console.php');
+
+$application = new yii\console\Application($config);
+$application->run();

0 comments on commit 4fb9105

Please sign in to comment.