PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Wladek   PHP File Magic   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: An example for FileMagic class
Class: PHP File Magic
Check file access and execution permissions
Author: By
Last change:
Date: 7 years ago
Size: 382 bytes
 

Contents

Class file image Download
<?php

require __DIR__.DIRECTORY_SEPARATOR.'filemagic.php';
$m= new FileMagic('/bin/bash');

// This test generates all information regarding to the filename
var_dump($m->collected());
// OR we need the MIME type of affected file
var_dump($m->mime());
// OR we need an info about the file whether executeable or not reagrding to its mime type
var_dump($m->executable());