PHP code example of nette / safe
1. Go to this page and download the library: Download nette/safe 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/ */
nette / safe example snippets
// we are making copy of file
copy('/oldfile', '/newfile');
unlink('/oldfile');
use Nette\Safe;
// we are making copy of file
Safe::copy('/oldfile', '/newfile');
Safe::unlink('/oldfile');