php 获取读取文件内容

    /*
     * 获取文件内容
     *
     */
    public function getLocalFileContents($file)
    {
        $handle = @fopen($file, "rb");
        if ( !$handle )
        {
            return false;
        }
        else
        {
            $strContents = @fread( $handle, filesize( $file ) ) ;
            @fclose($handle);
            return $strContents;
        }
    }

原文地址:https://www.cnblogs.com/gaogaoxingxing/p/7691718.html