<?php
$a = true;
if ($a) {
echo "<script>alert(\"Hello\");</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<p id="someid"></p>
<?php
$a = true;
if ($a) {
echo "<script>document.getElementById(\"someid\").innerHTML = \"Пароль неверен!\";</script>";
}
?>
</body>
</html>
tranfrosm: translate...
.<?php
$dsn = 'mysql:host=localhost; dbname=id14206595_reg';
$pdo = new PDO($dsn, 'id14206595_lotvw','k~~^RlBz[7!7Sr~6');
$owner = $_SESSION['id'];
echo '<ul>';
$query = $pdo->query("SELECT * FROM `usertable1` WHERE `owner`='$owner'");
while($row = $query->fetch(PDO::FETCH_OBJ)) {
echo '<li><a href="/tables/new.php"><div class="box1"><h1>'.$row->title.'</h1><hr><p>Открыть <i class="fas fa-door-open"></i></p></div></a></li>';
}
echo '</ul>';
?>
"SELECT * FROM `usertable1` WHERE `owner`='$owner'"
load_theme_textdomain( 'theme-name', get_template_directory() . '/languages' );
/* Берем контент файла */
$xmlString = file_get_contents($xmlFilePath);
// Преобразуем xml в массив
$xml = json_decode(
json_encode((array)simplexml_load_string($xmlString)), true
);
$data = array(
array(
"title" => "Another title",
"date" => "Fri, 17 Jun 2011 08:55:57 +0200"
),
array(
"title" => "My title",
"date" => "Mon, 16 Jun 2010 06:55:57 +0200"
)
);
function sortFunction( $a, $b ) {
return strtotime($a["date"]) - strtotime($b["date"]);
}
usort($data, "sortFunction");
var_dump($data);
<?php
$arr = json_decode(
json_encode((array) simplexml_load_string($xmlString)), true
);
print_r($arr);
index.php
, а параметры dispatch=discussion.view&thread_id=1
следует искать в %{QUERY_STRING} или %{THE_REQUEST}.RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{QUERY_STRING} (?:^|&)dispatch=discussion\.view(?:$|&)
RewriteCond %{QUERY_STRING} (?:^|&)thread_id=(\d+)(?:$|&)
RewriteRule ^index\.php$ /reviews/%1/? [R=301,L]
RewriteRule ^reviews/(\d+)/$ /index.php?dispatch=discussion.view&thread_id=$1 [L]