Jump to content
Larry Ullman's Book Forums

Chapter 8: Working with Date and time - fatal error


Recommended Posts

Hi,

I get the following error and a blank page trying to print the date and time, and I can't seem to find what I did wrong:

error: <br /> <b> fatal error </b>: uncaught ArgumentCountError...

it seems to happen when I replace the title with the PHP script (which includes the constant) in the header.

When I remove that PHP script and leave it like it was in the beginning, I get the result the in screenshot and the date and time printed look strange.

Regards

Yannick

header.PNG

books.PNG

footer.PNG

index.PNG

result-without-php-in-title.PNG

Link to comment
Share on other sites

Ah, your code uses `if define()` when it should be `if defined()`. That's what your error means: define() requires two arguments, the constant name and the value, but you're only providing one (because you meant to use defined()). 

Link to comment
Share on other sites

 Share

×
×
  • Create New...