One_Step Posted January 7, 2017 Share Posted January 7, 2017 As a user of a website, like my own, is it possible to see the code that has been used on a page? I was wondering about it because the following code would be visible, and I assume giving my database password to everyone would be a terrible thing to do. <?php$servername = "localhost";$username = "username";$password = "password";// Create connection$conn = new mysqli($servername, $username, $password);// Check connectionif ($conn->connect_error) { die("Connection failed: " . $conn->connect_error);} echo "Connected successfully";?> Link to comment Share on other sites More sharing options...
Don E Posted January 7, 2017 Share Posted January 7, 2017 If PHP is properly set up on the server, no, you wouldn't be able to see the code. You'd only see the output of the code(if any), but not the actual code like the above. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now