pathChecker.php 396 B

1234567891011121314151617
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. if (isset($_GET['path'])) {
  7. $path = urldecode($_GET['path']);
  8. if (file_exists('../../../../' . $path)) {
  9. echo 'path exists: true';
  10. } else {
  11. echo 'path exists: false';
  12. }
  13. } else {
  14. throw new \InvalidArgumentException("GET parameter 'path' is not set.");
  15. }