Advertisement
Justman10000

UltimateFlarumMaster | site.php

Dec 15th, 2021
761
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /*
  4.  * This file is part of Flarum.
  5.  *
  6.  * For detailed copyright and license information, please view the
  7.  * LICENSE file that was distributed with this source code.
  8.  */
  9.  
  10. /*
  11. |-------------------------------------------------------------------------------
  12. | Load the autoloader
  13. |-------------------------------------------------------------------------------
  14. |
  15. | First, let's include the autoloader, which is generated automatically by
  16. | Composer (PHP's package manager) after installing our dependencies.
  17. | From now on, all classes in our dependencies will be usable without
  18. | explicitly loading any files.
  19. |
  20. */
  21.  
  22. require __DIR__.'/vendor/autoload.php';
  23.  
  24. /*
  25. |-------------------------------------------------------------------------------
  26. | Configure the site
  27. |-------------------------------------------------------------------------------
  28. |
  29. | A Flarum site represents your local installation of Flarum. It can be
  30. | configured with a bunch of paths:
  31. |
  32. | - The *base path* is Flarum's root directory and contains important files
  33. |   such as config.php and extend.php.
  34. | - The *public path* is the directory that serves as document root for the
  35. |   web server. Files in this place are accessible to the public internet.
  36. |   This is where assets such as JavaScript files or CSS stylesheets need to
  37. |   be stored in a default install.
  38. | - The *storage path* is a place for Flarum to store files it generates during
  39. |   runtime. This could be caches, session data or other temporary files.
  40. |
  41. | The fully configured site instance is returned to the including script, which
  42. | then uses it to boot up the Flarum application and e.g. accept web requests.
  43. |
  44. */
  45.  
  46. return Flarum\Foundation\Site::fromPaths([
  47.     'base' => __DIR__,
  48.     'public' => __DIR__,
  49.     'storage' => __DIR__.'/storage',
  50. ]);
Advertisement
RAW Paste Data Copied
Advertisement