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
CodePudding user response:
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