RE: Running a Power Point Slide

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

 



One slight change to that. readfile() does not always work, so use
file_get_contents() instead.

Rob.
________________________________

From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of Atkinson, Robert
Sent: 31 August 2006 12:37
To: php-objects@xxxxxxxxxxxxxxx
Subject: RE:  Running a Power Point Slide



You have to output the right Content-Header to make the browser run the file
instead. Depending on the browser, it may still refuse to run the file.

This code should work for MS Powerpoint :- 

<?
$ctype = "application/vnd.ms-powerpoint";

header("Content-Description: File Transfer"); 
header("Content-Type: $ctype"); 
header("Content-Disposition: attachment; filename=file.ppt;");
header("Content-Transfer-Encoding: binary"); 

readfile("C:\FILES\PRESENTATION.PPT"); 
exit; 
?> 

Rob.

***********************************************************************************
Any opinions expressed in email are those of the individual and not necessarily those of the company. This email and any files transmitted with it are confidential and solely for the use of the intended recipient or entity to who they are addressed. It may contain material protected by attorney-client privilege. If you are not the intended recipient, or a person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
Random House Group +44 (0) 20 7840 8400.
http://www.randomhouse.co.uk
http://www.booksattransworld.co.uk 
http://www.kidsatrandomhouse.co.uk
***********************************************************************************



PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux