Skip to content

Instantly share code, notes, and snippets.

@m8rge
Last active June 21, 2018 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m8rge/d359b059c43bbd4065d168d8c10fc97a to your computer and use it in GitHub Desktop.
Save m8rge/d359b059c43bbd4065d168d8c10fc97a to your computer and use it in GitHub Desktop.
<?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