+ 3

Please help . No output .

<?php echo "hello"; // this is not showing to #hello to my screen ?> Hii. // I get this output if I write anything outside the PHP tag.

12th Nov 2017, 8:49 AM
Shubham Gupta
Shubham Gupta - avatar
6 Answers
+ 8
Are You trying this in SL or somewhere else? In the second way, where?
12th Nov 2017, 9:01 AM
JaMi
JaMi - avatar
+ 9
Appache - php insert to C: / xampp / htdocs / HelloWorldinPHP/index.php then you find it in localhost in your browser php starts <?php and may end ?> if there is not end of file and follow next html
12th Nov 2017, 4:54 PM
JaMi
JaMi - avatar
+ 3
I guess this is related with earlier one. You should open the file via a PHP enabled server. I guess you are having a .html file and trying to open that in your browser. But it doesn't work. PHP files must be served via a PHP enabled server. A browser cannot interpret PHP.
12th Nov 2017, 9:05 AM
Sajith Warnasooriya
Sajith Warnasooriya - avatar
+ 3
Try accessing php file as a web page rather than accessing it as a file. Like this, http://localhost/{yourfilepathinhtdocsfolder}.php
12th Nov 2017, 2:40 PM
Sajith Warnasooriya
Sajith Warnasooriya - avatar
+ 2
reinstall your Local server software
12th Nov 2017, 8:59 AM
Ribaz Kurdistani
Ribaz Kurdistani - avatar
+ 1
guys I am using xampp sever , html is working but PHP having problems.....
12th Nov 2017, 2:07 PM
Shubham Gupta
Shubham Gupta - avatar