wgenial / php-mimetypeicon
Package that provides mime type icons
Installs: 2 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
- wgenial/php-mimetyper: ^2.0
Requires (Dev)
- phpunit/phpunit: ^8.5
README
Package that provides mime type icons
Install
composer require wgenial/php-mimetypeicon
Usage
<?php require __DIR__ . '/vendor/autoload.php'; use WGenial\PHPMimeTypeIcon\PHPMimeTypeIcon; echo "<img src='". PHPMimeTypeIcon::getURI('file1.zip',16) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('file2.txt',22) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('file2.docx',24) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('file3.xml',32) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('file4.html',48) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('file5.js',64) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('https://upload.wikimedia.org/wikipedia/commons/2/26/Logo-composer-transparent.png',96) ."'>"; echo "<img src='". PHPMimeTypeIcon::getURI('https://en.wikipedia.org/wiki/PHP#/media/File:PHP-logo.svg','scalable') ."'>"; echo "<img style='width:120px;height:120px;' src='". PHPMimeTypeIcon::getURI('file6.xlsx','scalable') ."'>"; echo "<img style='width:180px;height:180px;' src='". PHPMimeTypeIcon::getURI('https://media.giphy.com/media/13hxeOYjoTWtK8/giphy.gif','scalable') ."'>";