How to use PHP & PowerPoint - Export/Convert PPT To HTML Slides The Learn / Tutorial / Sctipts php programming how to using PHP Create PowerPoint and Export/Convert PPT To HTML Slides
ShotDev Focus:
- PHP & Create PowerPoint and Export/Convert PPT To HTML Slides
Example
php_ppt_to_html.php
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?
$ppApp = new COM("PowerPoint.Application");
$ppApp->Visible = True;
$strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); // C:/AppServ/www/myphp
$ppName = "MySlides.ppt";
$FileName = "MyPP/MyPPt";
//*** Open Document ***//
$ppApp->Presentations->Open(realpath($ppName));
//*** Save Document ***//
$ppApp->ActivePresentation->SaveAs($strPath."/".$FileName,14);
//$ppApp->ActivePresentation->SaveAs(realpath($FileName),14);
$ppApp->Quit;
$ppApp = null;
?>
PowerPoint Created <a href="<?=$FileName?>.htm">Click here</a> to View.
</body>
</html>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_ppt_to_html.php
Screenshot



