include_path.phpt 862 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Phar: include_path with phar:// wrapper
  3. --EXTENSIONS--
  4. phar
  5. --CONFLICTS--
  6. tempmanifest1.phar.php
  7. --INI--
  8. phar.readonly=0
  9. --FILE--
  10. <?php
  11. $fname = __DIR__ . '/tempmanifest1.phar.php';
  12. $a = new Phar($fname);
  13. $a['file1.php'] = 'file1.php
  14. ';
  15. $a['test/file1.php'] = 'test/file1.php
  16. ';
  17. unset($a);
  18. set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname);
  19. include 'file1.php';
  20. set_include_path('.' . PATH_SEPARATOR . 'phar://' . $fname . '/test');
  21. include 'file1.php';
  22. include 'file2.php';
  23. ?>
  24. --CLEAN--
  25. <?php
  26. @unlink(__DIR__ . '/tempmanifest1.phar.php');
  27. ?>
  28. --EXPECTF--
  29. file1.php
  30. test/file1.php
  31. Warning: include(file2.php): Failed to open stream: No such file or directory in %sinclude_path.php on line %d
  32. Warning: include(): Failed opening 'file2.php' for inclusion (include_path='%sphar://%stempmanifest1.phar.php/test') in %sinclude_path.php on line %d