PageRenderTime 57ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/bad/ext/standard/tests/file/windows_links/bug48746_3.php

https://github.com/abhiskaushik/hhvm
PHP | 21 lines | 20 code | 1 blank | 0 comment | 0 complexity | 15fcd23d0cacb807f6a39902ab762c97 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, MIT, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. <?php
  2. include_once __DIR__ . '/common.inc';
  3. $old_dir = __DIR__;
  4. $dirname = __DIR__ . "\\mnt\\test\\directory";
  5. exec("mkdir " . $dirname, $output, $ret_val);
  6. chdir(__DIR__ . "\\mnt\\test");
  7. exec(get_junction()." junction directory", $output, $ret_val);
  8. file_put_contents("junction\\a.php", "<?php echo \"I am included.\n\" ?>");
  9. file_put_contents("junction\\b.php", "<?php echo \"I am included.\n\" ?>");
  10. include "junction/a.php";
  11. require_once "junction\\b.php";
  12. print_r(scandir("junction"));
  13. unlink("junction\\a.php");
  14. unlink("junction\\b.php");
  15. chdir($old_dir);
  16. rmdir(__DIR__ . "\\mnt\\test\\directory");
  17. rmdir(__DIR__ . "\\mnt\\test\\junction");
  18. rmdir(__DIR__ . "\\mnt\\test");
  19. rmdir(__DIR__ . "\\mnt");
  20. ?>