Solved

php error date/time

Posted on 2013-12-03
2
557 Views
Last Modified: 2013-12-03
I'm going through a book for the second time and I got the following error message for the following script.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/1999/xhtml" xml: lang="en" lang = "en">
<head>
      Today&rsquo;s Date</title>
      <meta http-equiv = "content-type"
            content = "text/html; charset=utf-8" />
</head>
<body>
      <p>Today&rsquo;s date (according to this web server is
      <?php
            echo date('l, F dS Y.');
      ?>
</body>
</html>

FWIW last time I did this I used an actual server on a site and I'm assuming it could have been set not to display errors.
Screen-Shot-2013-12-03-at-8.48.1.png
0
Comment
Question by:burnedfaceless
2 Comments
 
LVL 16

Expert Comment

by:Chris Harte
Comment Utility
That error means that you have not set the date/time zone in your php.ini file. Look for the [Date] label. This is mine

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/London

Open in new window

0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
Comment Utility
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now