Ejemplo n.º 1
0
 /**
  * gets a filename from a path string
  * @param string $file full path of file
  * @param array $options you can set 'utf8' => true and the filename will
  *              be utf8
  * @return string $filename the filename     
  */
 public static function getFilename($file, $options = array())
 {
     if (isset($options['utf8'])) {
         $info = path::utf8($file);
     } else {
         $info = pathinfo($file);
     }
     return $info['filename'];
 }
Ejemplo n.º 2
0
<?php

// index
use diversen\boot;
use diversen\conf;
use diversen\file\path;
if (file_exists('vendor')) {
    $path = '.';
    include 'vendor/autoload.php';
} else {
    $path = "..";
    include '../vendor/autoload.php';
}
$path = path::truepath($path);
conf::setMainIni('base_path', $path);
$boot = new boot();
$boot->run();