src/helpers/FileHelper.php
public static function read($path, $die = true)
    {
        $path = Yii::getAlias($path);

        if (is_readable($path)) {
            return file_get_contents($path);
        }

        $level = $die ? Logger::LEVEL_ERROR : Logger::LEVEL_WARNING;
        Yii::getLogger()->log('Failed to read file: ' . $path, $level, 'file');

        return false;
    }
public static function read($path, $die = true)
    {
        $path = Yii::getAlias($path);

        if (is_readable($path)) {
            return file_get_contents($path);
        }

        $level = $die ? Logger::LEVEL_ERROR : Logger::LEVEL_WARNING;
        Yii::getLogger()->log('Failed to read file: ' . $path, $level, 'file');

        return false;
    }
public static function read ( $ path , $ die = true ) { $ path = Yii :: getAlias ( $ path ) ; if ( is_readable ( $ path ) ) { return file_get_contents ( $ path ) ; } $ level = $ die ? Logger :: LEVEL_ERROR : Logger :: LEVEL_WARNING ; Yii :: getLogger ( ) -> log ( 'Failed to read file: ' . $ path , $ level , 'file' ) ; return false ; }
Reads and returns file content.
@param string $path
@return string|false false if can't read
Reads and returns file content .