public_ftp and public_html

Status
Not open for further replies.

Deadlock

New Member
Messages
1
Reaction score
0
Points
0
Apologies if this has been asked before, but can the contents of these two directories be accessed by anyone? I remember reading something similar in the tutorial. I realise that if for instance, I wrote PHP code such as this:
PHP:
<html>
<head>Hello World Program</title></head>
<body>
<?php
    echo "<p>Hello World!"
?>
</body>
</html>
Then the output on the page would be this:
HTML:
<html>
<head>Hello World Program</title></head>
<body>
<p>Hello World!</body>
</html>

But would there be any way to view the source PHP code?
 

lionheart8

New Member
Messages
177
Reaction score
0
Points
0
Hi
As much as I know, you can only view the source php code if you have access to the php file on the server, e.g. via the cpanel file manager.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
No, you can not view the PHP source code. The public_html folder just means anything you put in there is available to be viewed by the public, where you want your website ;).

No one can see the actual code before it is executed though.

-Corey
 
Status
Not open for further replies.
Top