Re: Displaying files

From: Date: Thu, 14 Aug 2008 19:55:48 +0000
Subject: Re: Displaying files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-278084@lists.php.net to get a copy of this message
Dan Shirah wrote:
I think this should be a simple question and answer, but after looking through the manual and goggling I have yet to find an answer. Question: Using PHP, how would I go about opening a file in a window, table or div? Example: I have a file called 123.xls. When a condition is met, I want PHP to open this file into the current window. I know I can use Javascript to easily do this, but due to the requirements of my application, javascript is not an option here. I tried using fopen() but that only opens the file in the background for PHP to read/write to and will not display the file in a browser. Any ideas? Thx, Dan
Who needs PHP... :) The following will open a new browser window and load the href in it. <a href="http://examples.com/123.xls" target="_blank">Open It!!!</a> If that isn't what you are looking for, please give a little more details. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare

« previous php.general (#278084) next »