473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Page Last Updated Syntax error

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?
<?php
$last_modified = filemtime("last4.php");
print("Page Last Updated: ");
print(date("m/j/y h:i", $last_modified));
?>

Oct 17 '07 #1
5 1449
..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?
><?php
$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
Oct 18 '07 #2
On Oct 18, 4:41 am, Richard <richardvan...@sbcglobal.netwrote:
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?

<?php
$last_modified = filemtime("last4.php");
print("Page Last Updated: ");
print(date("m/j/y h:i", $last_modified));
?>
This code is working for me

Oct 18 '07 #3
On 18 Oct, 00:41, Richard <richardvan...@sbcglobal.netwrote:
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!
Oct 18 '07 #4
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 <an*******@freemail.ru>

Oct 21 '07 #5
..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.
Oct 21 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Anja | last post by:
Hi, At the end of one of my php pages, I have a statemtent echo "<meta http-equiv=\"refresh\" content=\"0; url=Master.php\"> " ; which works well: it redirects to my page 'Master.php'. But,...
13
by: teenzbutler | last post by:
I have a 10mb ASP file, which will not load in IE 6.0. I get an HTTP 500 error. When I convert the 10mb file to HTML, it loads fine. Is there a limitation on file size? If so, is there a tag I...
1
by: Greg Burns | last post by:
I am trying to write a global custom error page. I thought I would jot down some of what I've learned so far... At first I just used the default customErrors section with a defaultRedirect tag,...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: Warmbells | last post by:
Hello, Most of the pages on the site I manage are html with a few with php snippits on them which are named .php, on the html pages I have a 'Last Updated' piece of code as follows Last...
8
by: m1post | last post by:
Hi, I'm very much a novice, and wondered if someone could help. I'll try to be as specific as possible, but don't waant you to have to read too much. I have 2 pages in the sequence. 1st allows...
1
by: Brock | last post by:
First note that I am using Framework 1.1. I have an .aspx page that is displaying a list of employees, but only the Employee Number, First Name, Last Name, and Title. It is working great. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.