On Thu, Feb 04, 2010 at 09:36:56PM +0000, Srdjan Todorovic wrote:
Hi,
On 4 February 2010 21:20, Chris G cl@isbd.net wrote:
Moving on, how can one find what *actually* works inside a <SCRIPT> section in HTML? Is it only javascript that really works there in 'most' browsers or are there other possibilities?
I belive it's just javascript. There might be other obscure client-side script languages that are supported though. There's probably something on W3C that lists the possible types of languages.
The other question is how does <?php work at all? I can't find anything that documents how or why it should allow PHP to do things. I'm maybe missing something obvious but given Google's total inability to look for such things doing any sort or searching is a bit difficult.
I'd say this is more a problem of a PEBKAC rather than Google's fault. ;)
I have O'Reilly books on HTML and PHP but neither of them really addresses how this works.
Maybe you're not reading carefully enough? :P
I do realise that <SCRIPT> starts client side scripting so is limited by what's implemented in browsers, ......
PHP is a *server-side* language. It has nothing to do with what is implemented in the browser.
Yes, I realise that, though HTML documentation doesn't seem to.
The <?php and <? tags are seen by the web server, passed to the PHP module/library/whatever, which is then what processes the PHP code, does business logic/db or file access/etc and then (often) generates HTML which is passed to the webserver and then sent to the client browser. I think. (I don't pretend to know exactly how this works though, so the above is a probable description of what happens given what I have come across and given that I'm a programmer).
Yes, so is the <?php tag just a bodge that only works with, for example, apache2, or what is it? Are there other tags like this possible, e.g. <?perl or <?python ? If not, why not? (I just like logic to my computer programming!)