PHP code example of ensostudio / reflection-file

1. Go to this page and download the library: Download ensostudio/reflection-file 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/ */

    

ensostudio / reflection-file example snippets




$options = getopt('f:', ['file:']);
$response =['status' => 'error', 'error' => null, 'data' => []];

$file = $options['file'] ?? ($options['f'] ?? false);
if (!$file) {
  $response['error'] = 'Required option -f (or --file) not set or empty';
  die(json_encode(response));