title: PHPRtfLite - RTF file opens as raw
body: <p>I am using PHPRtfLite library (<a href="http://sigma-scripts.de/phprtflite/docs/index.html" rel="nofollow">http://sigma-scripts.de/phprtflite/docs/index.html</a>) to produce an RTF file using PHP and Yii.</p>
  
  <p>So far, I've made a simple "Hello world" function.</p>
  
  <pre><code>Yii::import('ext.phprtf.PHPRtfLite'); 
  Yii::registerAutoloader(array('PHPRtfLite','registerAutoloader'), true); 
  $rtf = new PHPRtfLite();
  
  $sect = $rtf-&gt;addSection();
  $sect-&gt;writeText('Hello world!', new PHPRtfLite_Font(), new PHPRtfLite_ParFormat());
  
  //save rtf document
  $rtf-&gt;sendRtf('takis.rtf');
  </code></pre>
  
  <p>File is created successfully, but when I open it (either wordpad or ms word) I do not see the actual content of the file but the raw code of the RTF:</p>
  
  <pre><code>{\rtf\ansi\deff0\fs20
  {\fonttbl{\f0 Times New Roman;}}
  {\colortbl;\red0\green0\blue0;}
  {\info
  }
  \paperw11907 \paperh16840 \deftab1298 \margl1701 \margr1701 \margt567 \margb1134 \pgnstart1\ftnnar \aftnnrlc \ftnstart1 \aftnstart1 
  \pard \ql {\fs20 Hello world!}
  }
  </code></pre>
  
  <p>Do you have any idea on how to solve this?
  Thank you very much in advance.</p>