我有这段代码导致我的脚本崩溃。我敢肯定,我有某种引号混淆。现在已经盯着这个一个小时了,找不到错误。非常感谢任何帮助。
可以包含逗号,$title
可以吗?删除所有变量可以解决问题,也许这是我如何添加它们或它们包含什么的问题?
$contentopf = "
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<package xmlns=\"http://www.idpf.org/2007/opf\" unique-identifier=\"bookid\" version=\"3.0\" prefix=\"rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/\">
<metadata xmlns=\"http://www.idpf.org/2007/opf\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" >
<dc:format>application/epub+zip</dc:format>
<meta name=\"cover\" content=\"cover-image\" />
<dc:title>".$title."</dc:title>
<meta property=\"ibooks:version\">0.3.0</meta>
<dc:creator id=\"aut\">".$fname." ".$lname"</dc:creator>
<meta refines=\"#aut\" property=\"role\" scheme=\"marc:relators\">aut</meta>
<meta refines=\"#aut\" property=\"file-as\">".$lname.", ".$fname"</meta>
<dc:description>!</dc:description>
<dc:publisher>".$publisher."</dc:publisher>
<dc:date>".$year."</dc:date>
<dc:language>".$lang."</dc:language>
<dc:identifier id='bookid'>urn:uuid:".$uuid."</dc:identifier>
<meta refines='#bookid' property='identifier-type' scheme='xsd:string'>uuid</meta>
<dc:identifier id='isbn-id'>urn:isbn:".$isbn."</dc:identifier>
<meta refines='#isbn-id' property='identifier-type' scheme='onix:codelist5'>15</meta>
<meta property=\"dcterms:modified\">".$date."</meta>
<meta property=\"rendition:layout\">pre-paginated</meta>
<meta property=\"rendition:orientation\">landscape</meta>
<meta property=\"rendition:spread\">none</meta>
<meta property=\"ibooks:specified-fonts\">true</meta>
<meta property='ibooks:iphone-orientation-lock'>landscape-only</meta>
<meta property='ibooks:ipad-orientation-lock'>landscape-only</meta>
</metadata>
";
echo $contentopf;