Re: remote call - no return
| From: | Marek Kilimajer | Date: | Thu, 22 May 2003 15:32:30 +0000 |
| Subject: | Re: remote call - no return | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148564@lists.php.net to get a copy of this message | ||
Thomas Hochstetter wrote:
Yes. Well, here is the scipt that is called to return the id ... maybe it does not return: [snip] $file = "v.txt"; $data = $QUERY_STRING; function writevars($data,$file) { $fp = fopen ($file,"w"); // opens file for reading + writing if ($fp) //if the file exists (should always) { fputs($fp, $data); }echo $id; instead of return $id; return does not do anything here, it is used only for functions.fclose($fp);} writevars($data,$file); $id = md5(rand(2,12)); ==> return $id; put
[snip] See anything? ThomasSo you are saying thatif ($f = fopen($remote_path,'r'))works because you are getting to the while loop but fgets is not returninganything, whether you use >the loop or not? If I have that correct then perhaps you need to make sure that the file actually has >data in it. .Robbert van Andel