Php 能否将pdf动态转换为swf?
能否将PDF动态转换为SWF?我一直在努力,但结果证明很难 这是我的密码:Php 能否将pdf动态转换为swf?,php,file,pdf,flash,converter,Php,File,Pdf,Flash,Converter,能否将PDF动态转换为SWF?我一直在努力,但结果证明很难 这是我的密码: <?php include('include\settings.php'); $title = "k"; $makeswf= mysql_query("SELECT * FROM books WHERE title = '$title'"); $rows = mysql_num_rows($makeswf); if ($rows !=0) { while($rows = mysql_fetch_assoc($m
<?php
include('include\settings.php');
$title = "k";
$makeswf= mysql_query("SELECT * FROM books WHERE title = '$title'");
$rows = mysql_num_rows($makeswf);
if ($rows !=0)
{
while($rows = mysql_fetch_assoc($makeswf))
{
//where blocation is the pdf file need to be converted.
$file = $rows['blocation'];
echo exec('D:\wamp\www\dspzlibrary\converter\pdf2swf.exe books\$file.pdf -o books\$file.swf -f -T 9 -t -s storeallcharacters');
}
}
else
echo"empty";
?>
错误消息告诉您发生了什么。可执行文件pdf2swf.exe
试图打开的是$file.pdf
,而不是实际的文件名
在PHP中,内联变量替换需要双引号“”
echo exec("D:\wamp\www\dspzlibrary\converter\pdf2swf.exe books\$file.pdf -o books\$file.swf -f -T 9 -t -s storeallcharacters");
见:
双引号字符串最重要的特性是变量名将被扩展
“这是代码”-我想你可能忘了在那里发布代码。代码的格式不是这样的。php标记导致它被忽略显示。在“”双引号之后,现在仍然没有锁定