1. Go to this page and download the library: Download oohology/gitignorewriter 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/ */
oohology / gitignorewriter example snippets
(new GitIgnoreWriter('../.gitignore'))
->add('setup.php')
->before('setup.php', 'install.php')
->save();
$writer = (new GitIgnoreWriter('.gitignore.example'))
->setOutputPath('.gitignore');
// ...
$writer->save();
$writer = (new GitIgnoreWriter('.gitignore.example'));
// ...
$writer->save('.gitignore');
$writer = (new GitIgnoreWriter('.gitignore'))
->load('.gitignore.example');
// ...
$writer->save();