<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Creare file word con immagini da php]]></title><description><![CDATA[<p dir="auto">Ragazzi buongiono,<br />
espongo il mio problema:<br />
ho la necessità di creare da php un file di word contenente dei dati presi da mysql, e fin qui tutto bene, mi creo l'html e lo faccio scaricare come .doc</p>
<pre><code class="language-php">header("Content-type: Application/octet-stream");
header("Content-Disposition: attachment; filename=$filename.doc");*/
print($html);
</code></pre>
<p dir="auto">Il problema nasce quando devo inserire un'immagine, perchè una volta che apro il documento in word mi viene mostra come una bella x rossa...<br />
Ho provato col tag &lt;img&gt;, a codificare l'immagine in base64, ma non c'è stato verso; qualcuno ha mai affrontato un problema simile o ha idee?<br />
grazie <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://dev.connect.gt/topic/121649/creare-file-word-con-immagini-da-php</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 09:53:25 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/121649.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Feb 2010 11:16:56 GMT</pubDate><ttl>60</ttl></channel></rss>