RE: [PHP] remote call - no return

From: Date: Wed, 21 May 2003 21:56:01 +0000
Subject: RE: [PHP] remote call - no return
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148456@lists.php.net to get a copy of this message
At 22:53 21.05.2003, Thomas Hochstetter said: --------------------[snip]-------------------- >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); > } > fclose($fp); >} > >writevars($data,$file); >$id = md5(rand(2,12)); >==> return $id; >[snip] > >See anything? --------------------[snip]-------------------- Yes. First of all - what is "$remote_path" at the receiving end? If this is a URL using the fopen wrapper, your transmitter will never return any value - it needs to write it to STDOUT (simply use "echo $id" instead of returning it). -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#148456) next »