Instantly share code, notes, and snippets.

@m8rge /Writer.php
Last active Jun 21, 2018

Embed
What would you like to do?
<?php
class Controller
{
public function actionRun()
{
$a = new Writer();
$a->saveFile();
return readfile('/var/www/file.pdf');
}
}
<?php
class Writer
{
public function saveFile()
{
file_put_contents('/var/www/file.pdf', '123');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment