include_path.phpt 910 B

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