title: AppEngine PHP read and write blob to datastore
body: <p>The Google AppEngine PHP API provides a way to read and write to a blob.</p>
  
  <pre><code>  public function setBlobValue($blobValue)
    {
      $this-&gt;blobValue = $blobValue;
    }
    public function getBlobValue()
    {
      return $this-&gt;blobValue;
    }
  </code></pre>
  
  <p>However this doesn't seem to work when writing / reading an html string stored in a blob, e.g.</p>
  
  <pre><code>$string = "&lt;div&gt;Test&lt;/div&gt;"
  $obj-&gt;setBlobValue(base64_encode($string));
  </code></pre>
  
  <p>then after a query:</p>
  
  <pre><code>$string = base64_decode($obj-&gt;getBlobValue());
  </code></pre>
  
  <p>doesn't work - is there something I'm doing wrong here?</p>
  
  <p>(note this would be used to store much larger strings than the example here)</p>