Jump to content

I was wondering how to do this


Linera

Recommended Posts

Most likely it's using PHP, but it can also be another serverside technology. It's possible to configure your server you see, so it for example parses .html files for php, which is likely to be what they have done.

Link to comment
Share on other sites

I notice it has javascript files in the coding.
So? A server side scripting language is still the thing to work with the database (please oh please, just don't ask what's a database).
Link to comment
Share on other sites

I have a question regarding .htaccess, I tried to edit mine so php could be parsed through .html. But instead it just forced a download. What did I do wrong! I had it like you posted Jonas but with more such as .php and .htm. It would be nice to figure it out.

Link to comment
Share on other sites

http://www.wsabstract.com/howto/htaccess9.shtml
What if your server wasn't set up to deliver certain file types properly? A common occurrence with MP3 or even SWF files. Simple enough to fix: AddType application/x-shockwave-flash swf
AddType application/x-shockwave-flash swf tells the server to send files with swf extension with the MIME type application/x-shockwave-flash. Similarly, writing AddType application/x-httpd-php .html should tell the server to send files with html extension as PHP files, and so be sent to the PHP parser. It's possible though that it should be x-httpd-php html without the . (dot) infront of html. When I first googled (yes, it's that simple) for ".htaccess" and "parsing html files for php", I found an example with the dot in front of html: http://www.bigbold.com/snippets/posts/show/459Apologies. :)
Link to comment
Share on other sites

If you are talking about code inside of an HTML file to parse XML, HTML can't do anything dynamic. It is purely a formatting language. You could probably do it in Javascript, or else you would need to use a server-side language with some more power.

Link to comment
Share on other sites

OK, then you're talking about a PHP document, not an HTML document. Regardless of the file extension, if it gets sent to the PHP engine then it is a PHP document.Here is the XML reference on php.net:http://www.php.net/manual/en/ref.xml.phpOr if you have PHP 5.1, then you can use this instead:http://www.php.net/manual/en/ref.xmlreader.php

Link to comment
Share on other sites

I would advise more for the DOM functions. Some of them have already done wonders for me and I haven't explored and mastered them all yet.Another way you may use to... parse... XML documents is XSLT. You may execute XSLT transformation with PHP by the use of PHP's XSL(T) functions and by doing so, the user agent will get the result code of the transformation.btw as justsomeguy already mentioned, what determines the type of a document is how it is parsed, not what it's file extension is (just wanted to paraprase him).

Link to comment
Share on other sites

Through which XML parser? To my knowledge, there is not a server-side XML parser unless you build one programmatically, such as with PHP. If you want the browser to parse the file as an XML file, which IE cannot do, then you will need to have the server send the mime type of the file as either application/xml or application/xhtml+xml.What XML are you trying to parse, what is the goal of using an XML parser?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...