ID: 24967 Updated by: [EMAIL PROTECTED] Reported By: laurie at oneuponedown dot co dot uk -Status: Open +Status: Bogus Bug Type: *Directory/Filesystem functions Operating System: Linux PHP Version: 4.3.2 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Remove the @ from the fopen() call, and then go read the manual. Previous Comments: ------------------------------------------------------------------------ [2003-08-06 16:13:53] laurie at oneuponedown dot co dot uk Description: ------------ When using fopen inside a function to open a file for reading - irrerspective of weather fopen successfully opens the file, the use of fopen causes the function to return. Reproduce code: --------------- <html> <head> <title>TEST</title> </head> <body> <? function test () { // OPEN FILE FOR READING if ($ID = @fopen("/tmp/213.212.78.27.1060201522.txtfgbxdf","wb")) { // NOTHING FROM HERE DOWNWARDS IS EXCUTED // PRINT FIRST LINE OF FILE print(fgets($ID)); } else { // PRINT ERROR print("FOPEN FAILED"); } } ?> </body> </html> Expected result: ---------------- First line of file if success, "FOPEN FAILED" if fail. Actual result: -------------- Nothing ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24967&edit=1
