0

I'm installing php and received the following error message when trying to test some code on localhost.

I've played around with the code but nothing seems to work.

Here is the code:

<?php phpinfo();" >

Here is the error message:

Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /Users/stevenblinn/Sites/info.php on line 2

showdev
  • 28,454
  • 37
  • 55
  • 73
Steven Blinn
  • 3
  • 1
  • 3
  • 1
    The `" >` part looks odd. I'd remove it, or replace it with a closing `?>` PHP tag. Note that you can [omit the closing PHP tag](https://stackoverflow.com/questions/4410704/why-would-one-omit-the-close-tag) at the end of a file. – showdev Jul 26 '19 at 22:05

1 Answers1

1

try

<?php 
phpinfo();

Closing php tag is only useful when mixing with html

And yes, the quote was probably the problem.

fab2s
  • 838
  • 2
  • 8
  • 14