Jump to content

Recommended Posts

Hi

I am trying to create an xml file like this

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="hello world example" /> 
  <Content type="html">
     <![CDATA[ 
       Hello, world!
     ]]>
  </Content> 
</Module>

 

Insteas of the

    <![CDATA[ 
       Hello, world!
     ]]>

 

I would like to insert dynamic code. AS i am trying to allow my users to embed dynamic widgets to igoogle.

 

How can i replace this hello world code with dynamically placed code.

 

Any suggestions

Link to comment
https://forums.phpfreaks.com/topic/133765-dynamically-generate-xml/
Share on other sites

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="hello world example" />
  <Content type="html">
     <![CDATA[
        <?php
           //here put script to generate your data       
         ?>
     ]]>
  </Content>
</Module>

Hi osjimon,

Did you make sure the file was named .htaccess?

Also some hosts don't allow you to write .htaccess files so you might want to check that.

 

I was able to get this working using this file:

RewriteEngine on

RewriteBase /

RewriteRule ^test\.xml$ test.xml.php

 

Hope some of that helped.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.