Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2014
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <?php
  2.  
  3. include('mysql/first.php');
  4.  
  5. ?>
  6.  
  7. <?php
  8. die('What?');
  9. ?>
  10.  
  11. Bonjour
  12.  
  13. <?php
  14. echo file_get_contents('death.txt');
  15. include('exit.php');
  16. ?>
  17.  
  18. Hello there
  19.  
  20. <?php
  21. die('DONE');
  22. ?>
  23.  
  24. BonjourWhat?
  25.  
  26. Warning: file_get_contents(death.txt) [function.file-get-contents]: failed to open stream: No such file or directory in E:testmysqlfirst.php on line 2
  27. DONE
  28.  
  29. Included path: '.:'
  30. Including mysql/first.php: /Users/Kouno/Development/SandBox/test-php/mysql/first.php
  31. This is what `realpath` returns for './': /Users/Kouno/Development/SandBox/test-php
  32. Getting content of death.txt: /Users/Kouno/Development/SandBox/test-php/death.txt
  33. Bonjour
  34. Including exit.php: /Users/Kouno/Development/SandBox/test-php/exit.php
  35. What?
  36.  
  37. echo file_get_contents('death.txt', FILE_USE_INCLUDE_PATH);
  38.  
  39. Included path: '.:'
  40. Including mysql/first.php: /Users/Kouno/Development/SandBox/test-php/mysql/first.php
  41. Getting content of death.txt: (no path returned)
  42. Hello there
  43. Including exit.php: (no path returned)
  44. DONE
  45.  
  46. echo file_get_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'death.txt');
  47.  
  48. echo file_get_contents('..' . DIRECTORY_SEPARATOR . 'death.txt');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement