variable in xml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Quadrupel

    variable in xml

    How can I use a php-variable in an xml file?

    In this case I need $_SERVER['PHP_SELF'].

    --
    Thanks
  • Oli Filth

    #2
    Re: variable in xml

    Quadrupel wrote:[color=blue]
    > How can I use a php-variable in an xml file?
    >
    > In this case I need $_SERVER['PHP_SELF'].
    >[/color]

    echo $_SERVER['PHP_SELF'];

    ? What else do you need?

    --
    Oli

    Comment

    • Quadrupel

      #3
      Re: variable in xml

      Oli Filth wrote:
      [color=blue]
      > Quadrupel wrote:
      >[color=green]
      >>How can I use a php-variable in an xml file?
      >>
      >>In this case I need $_SERVER['PHP_SELF'].
      >>[/color]
      >
      >
      > echo $_SERVER['PHP_SELF'];
      >
      > ? What else do you need?
      >[/color]

      There is no echo in xml.

      --

      Comment

      • Oli Filth

        #4
        Re: variable in xml

        Quadrupel wrote:[color=blue]
        > Oli Filth wrote:
        >[color=green]
        > > Quadrupel wrote:
        > >[color=darkred]
        > >>How can I use a php-variable in an xml file?
        > >>
        > >>In this case I need $_SERVER['PHP_SELF'].
        > >>[/color]
        > >
        > >
        > > echo $_SERVER['PHP_SELF'];
        > >
        > > ? What else do you need?
        > >[/color]
        >
        > There is no echo in xml.
        >[/color]

        Well yes, and there's no PHP in XML either. If you want dynamic
        information in an XML file, you have to create the file dynamically
        using PHP (or ASP, etc. etc.)


        --
        Oli

        Comment

        • Janwillem Borleffs

          #5
          Re: variable in xml

          Quadrupel wrote:[color=blue]
          > How can I use a php-variable in an xml file?
          >
          > In this case I need $_SERVER['PHP_SELF'].[/color]

          When you mean during an XSLT transformation, you can pass external variables
          to the stylesheet and catch them there through <xsl:param /> elements.

          For PHP4, see:

          PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.


          For PHP5, see:

          PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.



          JW



          Comment

          • Quadrupel

            #6
            Re: variable in xml

            Janwillem Borleffs wrote:
            [color=blue]
            > Quadrupel wrote:
            >[color=green]
            >>How can I use a php-variable in an xml file?
            >>
            >>In this case I need $_SERVER['PHP_SELF'].[/color]
            >
            >
            > When you mean during an XSLT transformation, you can pass external variables
            > to the stylesheet and catch them there through <xsl:param /> elements.
            >
            > For PHP4, see:
            >
            > http://www.php.net/xslt_process
            >
            > For PHP5, see:
            >
            > http://www.php.net/manual/en/functio...-parameter.php
            >
            >
            > JW[/color]

            Thank you for the links.
            The problem is the output should be xml files.
            Maybe I'll create them with fopen.

            --
            Regards

            Comment

            • rovisoft

              #7
              re:variable in xml

              You can also try to write a "re-write" rule for htaccess so that the
              output file extension is xml and the content that generates it is php
              code!

              http://www.DevPlug.com --Connecting Developers
              Posted from: http://www.devplug.com/ftopic32057.htm

              Comment

              Working...