每当I中点一把干 a装入一个营地时,现场就与“STATUS_ACCESS_VIOLATION”发生碰撞。
My AJAX 文字:
<script>
function loadBlog() {
// Show the loader
document.getElementById("loader").style.display = "block";
// Make an AJAX request to fetch the blog content
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
// Hide the loader
document.getElementById("loader").style.display = "none";
// Update the blog container with the fetched content
document.getElementById("content").innerHTML = xhr.responseText;
}
};
xhr.open("GET", "blog.php", true);
xhr.send();
}
</script>
我在此呼吁:
<?php
//$Parsedown->setSafeMode(true); // Get all post UUIDs and sort by creation date of post.md file (most recent first)
$dir = "./data/posts"; // replace with the name of your subdirectory
$dirs = array_filter(glob($dir . /* ), is_dir ); // get all directories in subdirectory
//sort based on date set in post.json
usort($dirs, function($a, $b) {
$json_a = $a . /post.json ; // get path to post.json file
$json_b = $b . /post.json ; // get path to post.json file
if (file_exists($json_a) && file_exists($json_b)) { // check if post.json file exists
$contents_a = file_get_contents($json_a); // get contents of post.json file
$contents_b = file_get_contents($json_b); // get contents of post.json file
$data_a = json_decode($contents_a, true); // decode contents of post.json file into an array
$data_b = json_decode($contents_b, true); // decode contents of post.json file into an array
return strtotime($data_b[ date ]) - strtotime($data_a[ date ]); // sort by date
}
});
// loop through all directories
foreach ($dirs as $dir) {
$json = $dir . /post.json ; // get path to post.json file
if (file_exists($json)) { // check if post.json file exists
$contents = file_get_contents($json); // get contents of post.json file
$data = json_decode($contents, true); // decode contents of post.json file into an array
$uuid = $data[ uuid ]; // get UUID of post
$title = $data[ title ]; // get title of post
$date = $data[ date ]; // get date of post
$author = $data[ author ]; // get author of post
$description = $data[ description ]; // get description of post
$tags = $data[ tags ]; // get tags of post
$image = $data[ image ]; // get image of post
$post = $dir . /post.md ; // get path to post.md file
if (file_exists($post)) { // check if post.md file exists
$contents = file_get_contents($post); // get contents of post.md file
$html = $contents; // use the raw contents of the post.md file
echo <div class="post"> ;
echo <h1 class="post-title"><a href="/post.php?uuid= . $uuid . "> . $title . </a></h1> ;
echo <p class="post-date"> . $date . </p> ;
echo <p class="post-author"> . $author . </p> ;
echo <p class="post-description"> . $description . </p> ;
echo <p class="post-tags"> . $tags . </p> ;
echo <img class="post-image" src=" . $image . "> ;
echo <div class="post-content"> . $html . </div> ;
echo </div> ;
}
}
}
?>
只是在最近才开始。 较大的营地的其他移解在其他地区被使用,而生活环境则有零问题。 也许它是一个与阿帕奇本身有关的问题?