On 01/07/2021 06.49, Not_even...@example.net
> On Wed, 30 Jun 2021 22:23:32 +0200, "J.O. Aho" <us...@example.net
> Thanks for clarifying that. I don't control the server, but I've read
> that those who do can allow html files to be scanned for php code.
> Maybe my Web host has in fact done that. Would I be able to find some
> notation about that in the Web host's phpinfo.php file?
> Also, some scripts seem to work in html files and some don't.
> The following is the entire code for a file I named hello_1.html
> <title>PHP Test</title>
> <?php echo '<p>Hello World</p>'; ?>
> It produced the result:
> "Hello World
> '; ?> "
> in the browser. It's obviously got a little problem in the output, but
> it did produce a mostly useful output.
No, it's your web browsers html engine that detects a faulty html tag
with another html tag and tries it best to correct the html and shows
you what it thinks should be shown.
Had you written:
<?php echo 1+1; ?>
your output had been:
yes, nothing at all, and that is the proof of that the php code do not
be executed, had the php engine processed the page before sent to you,
you would have had a 2.
> Attempts to get the php script I actually want to use to run in an
> html file have not, so far, produced the thing the php script tries to
> do or else the file doesn't produce any result at all.
As long it's in a file ending with html/htm it will not be executed, so
matter what you write, nothing will happen, you need to change the
ending to php.
>> So this leads to the only thing you can do, rename your files so that
>> they are called .php instead of .html/.htm.
> Yeah, that would be a hassle, but if I can't get the php scripts to
> run in html files that may be what I'll have to do. I'd need to see
> how those php files would interact with the many html files they link
You just need to change the links to the new page name that ends with
.php and that's it.
>> solution for displaying last modified document time.
> supposed I could figure out how to get some message put in place of
display time the file was modified based on the users timezone.