PHP code example of weesee / yii2-system-info

1. Go to this page and download the library: Download weesee/yii2-system-info library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

weesee / yii2-system-info example snippets


{
    ""weesee/yii2-system-info": "~1.1.0"
    }
}

use weesee\systemInfo\models\SystemInfo;

public function actionShowinfo()
{
    // Initialize  Information to work with the current operating system
    $sysInfo = new SystemInfo();
    // get system details as Yii2 model
    $sysInfo->getInfo();
    // hand it over to view
    return $this->render('sysinfo',['sysInfo'=>$sysInfo]);
}

echo DetailView::widget([
    'model' => $sysInfo,
    'attributes' => $sysInfo->attributes(),
]);

echo $sysInfo->totalMemory;

[COM_DOT_NET] 
extension=php_com_dotnet.dll 
bash
$ php composer.phar update