The way that webpages are served is that the URL is broken up into parts. E.g.:
http://www.domain.com/example-directory/test.php
It is broken up so that the http:// supplies the server with the sort of protocol you are communicating with it in. The
www.domain.com allows the sebserver to know which account you want the webpages for. Finally the last bit allows the webserver to locate the file. The way that this works is that here:
http://www.domain.com/
is reffering to the public_html/ directory, i.e.:
/home/account/public_html/
So if, as per the example URL you create a directory at:
/home/account/public_html/example-directory/
and upload test.php into it the path to the php file is:
/home/account/public_html/example-directory/test.php
So first you put the directory you added into public_html on the end of the domain i.e.:
http://www.domain.com/example-directory/
Then the file name:
http://www.domain.com/example-directory/test.php
So if you check the location of the file on the server you will be able to construct a URL to get there with your browser.
Also you need to enser that the file has the correct ownership and has the correct permissions. The file has to be owned by and be in the same group as the user. You can set this with the following command:
chown user.user file.name
where user is the name of the cpanel account. To set the permissions you need to use the following command:
chmod 755 file.name