Answer the question
In order to leave comments, you need to log in
How can I get access to the site's source code?
For example, there is such a structure:
<?php
$host = "localhost";
$oser = "root";
$pass = "123";
$dbname = "news";
$conn = new mysqli($host, $oser,$pass,$dbname);
if(!conn) die ("описание " . $conn->connect_error);
$sql = "SELECT * FROM `news`";
$result = $conn->($sql);
?>
<!DOCTYPE HTML>
<html lang="ru">
<head></head>
и т д
<?php ?>
is not visible. But this is considered bad manners and not safe. The question itself is: how can an attacker see this?
Answer the question
In order to leave comments, you need to log in
He will not see it in any way (without having access to the file system on the server, of course).
About the bad tone - it needs to be separated: the output template is always separated from the main code.
About safety - fairy tales.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question