ID: 48526 Comment by: jason at ovitech dot nl Reported By: jason at ovitech dot nl Status: Feedback Bug Type: Filesystem function related Operating System: OSX PHP Version: 5.2.9 New Comment:
No I did not. Now I have and it seems to work. But what is the difference? shouldn't have work anyway since these are just flags you pass to the function? Previous Comments: ------------------------------------------------------------------------ [2009-06-11 20:22:53] ka...@php.net Without looking deeply into this, have you tried with fopen(..., 'wb') instead of bw ? ------------------------------------------------------------------------ [2009-06-11 09:26:56] jason at ovitech dot nl Description: ------------ When I open a file with the b flag in it. for example bw I get the error that the file does not exists. That is correct and I want fopen to create the file for me and set the pointer on the beginning of the code. that is why I use the w flag. I have used the b flag because of the note that is underneath the fopen manual file on the site./ Reproduce code: --------------- $fp = fopen($this->_file, "bw"); Expected result: ---------------- A new file created in /tmp/12 called foo2.txt Actual result: -------------- Warning: fopen(/tmp/12/foo2.txt) [function.fopen]: failed to open stream: No such file or directory in /Users/jason/Sites/zf/myclass.php on line 168 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48526&edit=1