PHP Write to file
<?php
$file = './less/imports.less';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
$current .= "@import 'imports/custom.less';\n";
// Write the contents back to the file
file_put_contents($file, $current);