For example if I have a php script named 'runAllTests.php' '/ var / www / tests / RunAllTests .php '' and I execute phpunit within that directory, which contains "RunAllTests.php".
If I execute phpunit on the same file, then the files contained in '/ var / www /', "RunAllTests.php" can not be located from the second directory. - "Failed to open the stream:" There is no such file or directory "
I have kept it a little ambiguous, let me know that you need some more features.
Your requirements are incorrect / not portable: They expect the directory of the file (or some other fixed directory).
< / P>Your options are as follows:
- Just start the process from the right directory.
-
chdir (__DIR__) in your script. - Your file consistently / related to the
__DIR __(which is the IMHO most portable) <
Comments
Post a Comment