0

Simple, I had a html that echo from php (saven in .php) but not even a simpe code as

    <?php echo"ggg"; ?>

works, I tried with xammp and Wamp either chrome and firefox but doesn't work. What can I do?

edit: already solved, I forgot to run it from localhost, thank you all.

1 Answers1

0

Any of these (or more) could be your answer why it is not working

  1. Is there actually PHP running on your computer? Check it with <?php echo phpinfo(); ?>
  2. Are you accesing the file through your browser doing something like http://localhost/myfile.php
  3. If it is on a remote server, is there PHP installed? https://stackoverflow.com/a/43129028/2151290
  4. Put your file inside c:/xampp/htdocs for xampp or c:/wamp/www for wamp // Note that drive name may vary depending where you install c: or d:
Community
  • 1
  • 1
Rafiqul Islam
  • 1,636
  • 1
  • 12
  • 25
  • 1
    I agree with the sentiment - it's bad style to omit spaces - but this doesn't answer the question. The OP's code should work, bad as it looks. – Ray O'Donnell Mar 30 '17 at 21:55