--- In yhoomobiledevelopers@yahoogroups.com, "cstivers1978" <cstivers1978@...> wrote:
>
> On your php pages, add the following line:
>
> header('Content-Type: application/x-ywidget+xml');
>
> This will set the content-type to the one expected for blueprint pages.
>
Thanks for replying
I added the line as mentioned by you in my php pages but still it is failing to get displayed. below i 've copied the code that i 've used in php file
<?php
header('Content-Type: application/x-ywidget+xml');
require_once( "blueprint.php" );
$writer = new XMLWriter();
$writer->openMemory();
$writer->setIndent( true );
$writer->startDocument('1.0','UTF-8');
// Create Page and Section nodes
$page = new Blueprint_Page();
$module = new Blueprint_Module();
$page->addContent( $module );
// Set Module's header text
$module->setHeader( "PHP Version" );
// Add main content block
$module->addContent( new Blueprint_Block( "Hello World!" ) );
// Write everything to memory buffer
$page->Emit( $writer );
// Return buffer & flush
print( $writer->outputMemory() );
?>
The error which i 'm encountering on execution of widget is
XML Parsing Error: no element found
Location: http://beta.m.yahoo.com/w-raw/devtest-38aec7a915603c1dd26a1b1349a9120f-Kleward-2/greet.php
Line Number 2, Column 1:
I don't why the problem is surfacing despite the fact i 'm followed the steps that 're mentioned in BlueprintDevGuide.
Thanks