RE: [PHP] Opening a file in a new window
| From: | George Pitcher | Date: | Mon, 10 Mar 2003 17:34:23 +0000 |
| Subject: | RE: [PHP] Opening a file in a new window | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138982@lists.php.net to get a copy of this message | ||
Todd,
if that script is the result of a link being follwed, add target="blank" to
the end.
George
> -----Original Message-----
> From: Todd Cary [mailto:todd@aristesoftware.com]
> Sent: 10 March 2003 5:28 pm
> To: php-general@lists.php.net
> Subject: [PHP] Opening a file in a new window
>
>
> Thanks to your help, this now is working:
>
> <?
> $session_id = $HTTP_POST_VARS[session_id];
> $filename = $HTTP_POST_VARS[filename];
>
> /* Validate session_id here */
>
> header("Content-type: text/html");
> header("Content-Disposition: filename=" . $filename);
> $fp = fopen($filename, "r");
> if($fp) {
> fpassthru($fp);
> fclose($fp);
> }
> ?>
>
> Now I would like to open the file in a new window and I am not sure how
> to do that.
>
> Todd
>
> --
> Ariste Software, Petaluma, CA 94952 \n info@aristesoftware.com
>