1. Go to this page and download the library: Download shufflingpixels/php-io 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/ */
use Shufflingpixels\IO\Buffer;
use Shufflingpixels\IO\SeekMode;
$buffer = new Buffer('abcdef');
$buffer->seek(2); // position = 2
$buffer->write('XY'); // data becomes: abXYef
$buffer->seek(-2, SeekMode::END); // position near end
$tail = $buffer->read(2); // "ef"
use Shufflingpixels\IO\File;
use Shufflingpixels\IO\FileMode;
$file = File::open('example.bin', FileMode::RW);
$file->write("ABC");
$file->seek(0);
$bytes = $file->read(3); // "ABC"
$file->close();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.