Unit Testing With SimpleTest in PHP keeping getting file directory errors from relative paths?

删除回忆录丶 提交于 2020-01-16 08:45:48

问题


I am using Zend Framework MVC and unit-testing with SimpleTest library. I have a specific model that keeps failing because it uses Zend Cache and the cache directory is a relative path I was wondering if anyone has seen a problem like this b4. Thanks.


回答1:


I had to make an absolute path using $_SERVER['DOCUMENT_ROOT'] that way no matter what file structure I am on it works. a Truly relative path. lol.



来源:https://stackoverflow.com/questions/1463557/unit-testing-with-simpletest-in-php-keeping-getting-file-directory-errors-from-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!