Сообщения

Сообщения за ноябрь, 2016

Yii 1.* + PHPExcel

Изображение
Команды Composer cd yii php composer require "yiisoft/yii:@stable" # подключили yii1 php composer require "phpoffice/phpexcel:@stable" # подключили phpexcel php \vendor\yiisoft\yii\framework\yiic webapp yii # создаем новое приложение в yii\index.php --- <?php // change the following paths if necessary $yii = dirname ( __FILE__ ) . '/vendor/yiisoft/yii/framework/yii.php' ; $config = dirname ( __FILE__ ) . '/protected/config/main.php' ; // remove the following lines when in production mode defined ( 'YII_DEBUG' ) or define ( 'YII_DEBUG' , true ); // specify how many levels of call stack should be shown in each log message defined ( 'YII_TRACE_LEVEL' ) or define ( 'YII_TRACE_LEVEL' ,3); require_once ($yii); require_once ( __DIR__ . '/vendor/autoload.php' ); // добавили вендоры Yii :: createWebApplication($config) -> run(); --- проверим в \yii\protected\views\site\index.php <?php $xls = new P