У меня есть это сообщение об ошибке:
Что не так в моем коде?
Ваша обратная косая черта превращается в специальные символы PHP. Например, . arrays
ews.php превращается в
Вам следует избегать их следующим образом:
Или используйте синглы, например:
Кроме того, ваш if запутан. Вы не должны fopen файл снова. Просто используйте свой $fp , который у вас уже есть.
I have this error message:
What is wrong in my code?
2 Answers 2
Your backslashes is converted into special chars by PHP. For instance, . arrays
ews.php gets turned into
You should escape them like this:
Or use singles, like this:
Also, your if is messed up. You shouldn’t fopen the file again. Just use your $fp which you already have.
Comments
Copy link Quote reply
geissler commented Dec 19, 2011
Under Windows 7 with PHPUnit 3.6.5 i have the following «configuration.xml»
When running PHPUnit within NetBeans or on the Windows Console the following error is logged (the tests are running properly):
file_get_contents(/G:/0.5.1/Src/Script/Model/Command/Command_Abstract.php): failed to open stream: Invalid argument Datei: C:xamppphpPEARPHPCodeCoverageReportHTMLRendererFile.php Zeile: 475
I have added in the file «PHP_CodeCoverage_Report_Node» in line 144/145 in function «getPath» the following: