1. Go to this page and download the library: Download kitpages/util-bundle 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/ */
php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Kitpages\UtilBundle\KitpagesUtilBundle(),
);
}
php
$util = $this->get('kitpages.util');
// create recursively a directory
$util->mkdirr("/tmp/test/foo/bar");
// delete recursively the test directory
$util->rmdirr("/tmp/test");
// send a jpg image to the browser with a 3600 expire time
$util->getFile("/tmp/toto.jpg", 3600)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.