user3583252 user3583252 - 3 months ago 12
PHP Question

How do I check after uploading files to the host

A very rookie question but I was not able to find any good answers.

I uploaded 3 php files to my host using FileZilla. One of my php files (name is dbtest.php) is connecting to a database and it should display "Success" if the connection is successful ("error" if not)

My host is 188.166..

My question is how do I view the php file output in the browser?

When I was uploading to my localhost, I can access the file as such: 127.0.0.1/{foldername}/dbtest.php but when I try 188.166../{foldername}/dbtest.php I get an error saying "The requested URL /vod_api/dbtest.php was not found on this server."

But I can access the file using:
ftp://188.166../{foldername}/dbtest.php

Although it doesn't show the output ("success"/"error") It just shows the php code

Answer

ok, you need to put it in public_html folder. not all the folders are accessible on web, some of these folders hold server settings and some are for your php application use only.

Edit: the public_html folder can have different names depending upon server. like www. best if you check with your hosting provider for details if you can't find the www or public_html folder.

For more help you can see here.