Page Last Updated Syntax error
Page Last Updated Syntax error
am 18.10.2007 01:41:50 von Richard
I tried embedding this in an XHTML file, then changed it to a
last4.php, but get a syntax error. What am I doing wrong?
$last_modified = filemtime("last4.php");
print("Page Last Updated: ");
print(date("m/j/y h:i", $last_modified));
?>
Re: Page Last Updated Syntax error
am 18.10.2007 03:42:00 von Michael Fesser
..oO(Richard)
>I tried embedding this in an XHTML file, then changed it to a
>last4.php, but get a syntax error. What am I doing wrong?
What syntax error and where?
>
>$last_modified = filemtime("last4.php");
>print("Page Last Updated: ");
>print(date("m/j/y h:i", $last_modified));
>?>
'print' doesn't require parentheses, it's not a function.
Micha
Re: Page Last Updated Syntax error
am 18.10.2007 06:30:53 von Nithin
On Oct 18, 4:41 am, Richard wrote:
> I tried embedding this in an XHTML file, then changed it to a
> last4.php, but get a syntax error. What am I doing wrong?
>
>
> $last_modified = filemtime("last4.php");
> print("Page Last Updated: ");
> print(date("m/j/y h:i", $last_modified));
> ?>
This code is working for me
Re: Page Last Updated Syntax error
am 18.10.2007 11:44:40 von Captain Paralytic
On 18 Oct, 00:41, Richard wrote:
> but get a syntax error.
> What am I doing wrong?
What you are doing wrong is not thinking before you post.
You tell us that you are getting a syntax error, but don't bother to
tell us what the error actually says!
Re: Page Last Updated Syntax error
am 21.10.2007 13:10:39 von AnrDaemon
Greetings, Michael Fesser.
In reply to Your message dated Thursday, October 18, 2007, 05:42:00,
MF> 'print' doesn't require parentheses, it's not a function.
But it is a good idea to use them IMHO. Code looks much more solid for me.
--
Sincerely Yours, AnrDaemon
Re: Page Last Updated Syntax error
am 21.10.2007 17:23:23 von Michael Fesser
..oO(AnrDaemon)
>Greetings, Michael Fesser.
>In reply to Your message dated Thursday, October 18, 2007, 05:42:00,
>
>MF> 'print' doesn't require parentheses, it's not a function.
>
>But it is a good idea to use them IMHO.
Not always. Take 'echo' for example: Of course you can also use it with
parentheses, but it not always behaves like a function and if you want
to pass multiple strings to it, parentheses can't be used at all.
Micha
PS: Could you please ajust your newsreader to start quoted lines with
just a '>'? That's the common way on Usenet and that's how all news-
readers detect quoted lines to display them differently for example.