PHP file is not responding

My website URL is:

http://rustorbit.epizy.com/dbconnect.php

What I’m seeing is:

I uploaded a simple php file which has one echo command. But when I access the php file it does not give any output. I’m getting this error. image
Please help.

I’m using this software:

I use google chrome.

Maybe you have a statement ended badly. For the echo command you can use it in two modes: as a defined variable or as a function. Example 1:

<?php
echo "test";
?>

Example 2:

<?php
echo("test");
?>

Tried both ways, Still not working.

Maybe it’s your Internet connection that doesn’t upload very well or you have different double quotes than I have, so for me it works with all those two codes and I have checked using a PHP Code Tester. Try testing out the code before uploading it and then upload it using FileZilla in your htdocs folder, and make sure the PHP code is starting with <?php and ending with ?>.

Yes, I use filezilla to upload. And I uploaded my html files including all javascripts and images etc, all works fine. I’m having error with running php code.

I downloaded the dbconnect.php and there is nothing wrong with the code. Please help.

I just copied your code.
image

You should rename dbconnect.php with test.php for now, and upload it in the htdocs folder, because dbconnect.php is a name used for scripts that connect to the MySQL database.

OHH!! It worked after renaming the file. I never came across that kind of issue. Thanks a lot. XD

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.