PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, July 2, 2022

[FIXED] When I try to run my code in chrome, i see the code that I have made in phpstorm and not the function that it has to do

 July 02, 2022     php, xampp     No comments   

Issue

I just started with php and I installed my xampp and got it running. Now I wanna run my code that I have, its a simple print function but when I try running it, I see the code appear in Chrome an not the print. this is what I have in my code: <?php echo "Hello World!"; ?> and when I try to run it I get the exact same thing on chrome Chrome code


Solution

You should start apache and MySQL if you are connecting to DB on XAMPP then put your script in the htdocs folder then you can run your code by going to http://localhost

Another solution is by running this command to start a php server

php -S 127.0.0.1:8000 index.php


Answered By - Youssef mahmoed
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing