Bug #12997 Updated: "readfile()" does not work fine with 'if' and case clauses

From: Date: Tue, 28 Aug 2001 11:25:53 +0000
Subject: Bug #12997 Updated: "readfile()" does not work fine with 'if' and case clauses
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-64501@lists.php.net to get a copy of this message
ID: 12997 Updated by: lyric Reported By: sampsa_lintunen@hotmail.com§ Old Status: Open Status: Bogus Bug Type: Filesystem function related Operating System: apache PHP Version: 4.0.4pl1 New Comment: You need to put quotes around a literal string like "example.txt", otherwise PHP thinks it's the concatenation of two strings "example" and "txt". Previous Comments: ------------------------------------------------------------------------ [2001-08-28 07:11:45] sampsa_lintunen@hotmail.com§ I have rather complicated architechture in my php-program (including a kind of programhandler...) In one php-file I tried to send an pdf-formatted file to the browser by using "readfile" -function. For my huge appointment it did not work well with "if" and "case" clauses. And the most imazing was that exactly same script worked in an other php-file (where the architecture was simplier). I give you a simple example how the "bug" behaves ********* $i=1; if ($i==1) readfile(example.txt); //and nothing happens ********* $i=1; if ($i==1) readfile(example.txt); //this worked well else readfile(example.txt); //this was just for debugging ********* As you see, it seems to be no sence at all!!! You propably think that I had somethin wrong with my code, but no, I and my work mate debugged this problem a half day and I am sure that this bug was just like I said. I thought that I could have somethin wrong with the libraries but no error occurs... The libraries are self made and working well in other programs. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12997&edit=1

« previous php.dev (#64501) next »