Closed Thread Icon

Preserved Topic: PHP file chaining. (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=20915" title="Pages that link to Preserved Topic: PHP file chaining. (Page 1 of 1)" rel="nofollow" >Preserved Topic: PHP file chaining. <span class="small">(Page 1 of 1)</span>\

 
WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 05-21-2001 07:07

I am looking into using PHP for XML file parsing.

The way that I would like to use it is as follows:

1. user views a .xml file
2. the mime type causes a standard .php file to parse the document
3. the parsed value will then be returned to output.

I know that I could do the same deal via a query string, where the .xml file is called into a standard script.

for example: xmlparse.php?file=[the file to parse]

I would however like to do it differently. I am sure that this would need to be set up in the .htaccess or .httpconfig, but I am unsure of how I would do this, or if it would even be possible.

I know that it can be done with Java servlets, so I am guessing that it could also be done by php. Anyone have input on this?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 05-21-2001 08:16

Add this to .htaccess or httpd.conf:

AddType application/x-httpd-parse .xml
Action application/x-httpd-parse "/parser/parser.php?file="

Location of the parser in the second line is relative to DocumentRoot.

Enjoy!

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 05-21-2001 17:48

Thanks a lot max

« BackwardsOnwards »

Show Forum Drop Down Menu