用PHP COM加载word或者图片 手册上的例子:http://www.php.net/manual/en/book.com.phpAdd hyperlink at a Word Document's book <?php // Create COM instance to word function clsMSWord($Visible = false) { $this->handle = new COM("word.application") or die("Unable to instanciate Word"); $this->handle->Visible = $Visible; } function WriteHyperlink($Book,$Path,$Text) { $objBook = $this->handle->ActiveDocument->Books($Book); $range = $objBook->Range; $objHyperlink = $this->handle->ActiveDocument->Hyperlinks; $objHyperlink->add($range,$Path,"","",$Text);
手册上的例子:http://www.php.net/manual/en/book.com.phpAdd hyperlink at a Word Document's book <?php
// Create COM instance to word
function clsMSWord($Visible = false)
{
$this->handle = new COM("word.application") or die("Unable to instanciate Word");
$this->handle->Visible = $Visible;
} function WriteHyperlink($Book,$Path,$Text)
{
$objBook = $this->handle->ActiveDocument->Books($Book);
$range = $objBook->Range;
$objHyperlink = $this->handle->ActiveDocument->Hyperlinks;
$objHyperlink->add($range,$Path,"","",$Text);
}
?>
不知道有没有控件能转换回来.....
网上查了一下,很少相关的资料...希望有人知道指点一下...
这样的,怎么显示在页面上呢?
header('Content-type: image/jpg');
echo $img;
这样写的话,页面刷新以后弹出下载了,根本没法看效果...
我看别人的代码直接echo就出来了...
<?
header('Content-type: image/jpg');
require 'condb.php';
require 'func.php'; $result = getFetchArray("select content from news where id =7",$conn);
echo $result[0];
?>
直接打开,显示的是乱码test.php页面代码:
<html>
<body>
img src="imgtest.php"/>
</body>
</html>
这样引用也是没法显示图片....
好长啊,还是横着的