Posts Tagged with size

Displaying 1-4 of 4 results.
Resolved: PHP filesize MB/KB conversion
posted by admin on June 18, 2016
How can I convert the output of PHP's filesize() function to a nice format with MegaBytes, KiloBytes etc?

  • if the size is less than 1 MB, show the size in KB
  • if it's between 1 MB - 1 GB show it in MB
  • [*] if it's larger - in GBRead more
    Resolved: Yii CActiveDataProvider CListView pagination error
    posted by admin on April 15, 2016
    In Controller:

    $dataProviderComments = new CActiveDataProvider('Comments',
    'criteria' => array(
    'order' => 'id DESC',
    'pagination' => array(
    'pageSize' => 10,
    'pageVar'=> 'page'

    $this->render('/media/view', array('comments'=>$dataProviderComments));

    In View:

    <?php $this->widget('zii.widgets.CListView', array(
    )); ?>

    When my comments less than 10, all is right, but when will be pagination, start from 11, I see this error

    Fatal error: Call to a member function getId() on null in C:\xampp\htdocs\\framework\web\CController.php on line 962
    Read more
    Resolved: Yii CActiveDataProvider change default post count
    posted by admin on March 30, 2016
    In controller:

    $dataProvider = new CActiveDataProvider('Media');

    I want to change default post count in one pageRead more
    Resolved: Bxslider height not responsive when resize
    posted by admin on March 17, 2016
    bxslider height not responsive, when I resize window, width is OK, but height not changeRead more