How to open files with shell_exec() PHP function ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eddwinpaz
    New Member
    • Dec 2007
    • 4

    #1

    How to open files with shell_exec() PHP function ?

    hi there i need to open this path so it can return a XML

    Code:
    C:\Archivos de programa\Windows Media Player\plugins\Now Playing\now_Playing.xml
    im using windows but when i put shell_exec($pat h); does not return anything. thanks in advance for your help.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    Why would shell_exec work on that? (Did you even consult the manual?)

    If you need to work with XML files, PHP has a number of excellent XML Manipulation libraries you can use. I recommend trying SimpleXML.

    If you only need to relay the XML file to the browser, you can simply use the readfile function.

    Comment

    • eddwinpaz
      New Member
      • Dec 2007
      • 4

      #3
      i know i can work with simple XML but i still need to open this file from the windows machine because i want to be able to read it to see what windows media player is playing. and send that to my facebook account.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Then see the readfile() function like Atli suggested.

        Comment

        Working...