Guest User

Untitled

a guest
Nov 18th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. cd path/to/your/app
  2. php -S localhost:8000
  3.  
  4. php -S 0.0.0.0:<PORT_NUMBER>
  5.  
  6. <?php
  7. // router.php
  8. if (preg_match('/.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) {
  9. return false; // serve the requested resource as-is.
  10. } else {
  11. echo "<p>Welcome to PHP</p>";
  12. }
  13. ?>
  14.  
  15. php -S 0.0.0.0:8000 router.php
  16.  
  17. Welcome to PHP
  18.  
  19. # Get the devilbox
  20. $ git clone https://github.com/cytopia/devilbox
  21. $ cd devilbox
  22.  
  23. # Create docker-compose environment file
  24. $ cp env-example .env
  25.  
  26. # Edit your configuration
  27. $ vim .env
  28.  
  29. # Start all containers
  30. $ docker-compose up
Add Comment
Please, Sign In to add comment