Jump to content
Larry Ullman's Book Forums

Chapter 8: Working with Date and time - fatal error

Recommended Posts


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.








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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...