Re: Displaying files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux