본문 바로가기

PHP16

[p-book] admin alt text-delete '', 'alt' => '',]; // Initialize image array$errors = [ 'alt' => '', 'warning' => '',]; // Initialize error messageif ($id) { // If valid article id $sql = "SELECT i.id, i.file, i.alt FROM image AS i JOIN.. 2024. 6. 28.
[p-book] admin image-delete fetch(); // Get image data}if (!$image) { // If no image redirect('article.php', ['id' => $id]); // Redirect}$path = '../uploads/' . $image['file']; // Path to fileif ($_SERVER['REQUEST_METHOD'] == 'POST') { // If form was submitted $sql = "UPDATE article SET image_id = null WHERE id = :art.. 2024. 6. 28.
[p-book] admin article-delete 'Article not found']); // Redirect with error}$article = false; // Initialize article$sql = "SELECT a.title, a.image_id, i.file AS image_file FROM article AS a LEFT JOIN image AS i ON a.image_id = i.id WHERE a.id = :id;"; // SQL to get article data$article = pdo($pdo, $sql,.. 2024. 6. 28.
[p-book] admin article id 없을때 id 있을때  $id, 'title' => '', 'summary' => '', 'content' => '', 'member_id' => 0, 'category_id' => 0, 'image_id' => null, 'published' => false, 'image_file' => '', 'image_alt' => '',]; // Article data$errors = [ 'warning' => '', 'title' => '', 'summary' .. 2024. 6. 28.
[p-book] admin articles fetchAll(); // Get article summaries?> Articles Add new article ImageTitleCreatedPublishedEditDelete " alt=""> " class="btn btn-primary">Edit " class="btn btn-danger">Delete 2024. 6. 28.
[p-book] admin category-delete 'Category not found']); // Redirect with error}$sql = "SELECT name FROM category WHERE id = :id;"; // SQL to get category name$category = pdo($pdo, $sql, [$id])->fetchColumn(); // Get category nameif (!$category) { // If no category redirect('categories.php', ['failure' => 'Category not found']); // Redirect with error}if ($_SERVER['REQUEST.. 2024. 6. 28.
[p-book] admin category $id, 'name' => '', 'description' => '', 'navigation' => false,]; // Initialize category array$errors = [ 'warning' => '', 'name' => '', 'description' => '',]; // Initialize errors array// If there was an id, page is editing the category, so get curren.. 2024. 6. 28.
[p-book] admin categories fetchAll(); // Get all categories?> Categories Add new category Name Edit Delete " class="btn btn-primary">Edit " class="btn btn-danger">Delete 2024. 6. 28.
[p-book] admin index fetchColumn(); // Get number of articles$sql = "SELECT count(id) FROM category"; // SQL$category_count = pdo($pdo, $sql)->fetchColumn(); // Get number of categories?> Admin CountCreateView Categories Add View Articles Add View 2024. 6. 28.
[p-book] header Skip to content Menu " > Search  document.body.classList.add('js');var toggle = document.querySelector('#toggle-navigation');var menu = document.querySelector('#menu');var menuItems = document.querySelectorAll('#menu li a');toggle.a.. 2024. 6. 28.
[p-book] search fetchColumn(); // Return count if ($count > 0) { // If articles match term $arguments['show'] = $show; // Add to array for pagination $arguments['from'] = $from; // Add to array for pagination $sql = "SELECT a.id, a.title, a.summary, a.category_id, a.member_id, c.name .. 2024. 6. 28.
[p-book] member fetch(); // Get member dataif (!$member) { // If array is empty include 'page-not-found.php'; // Page not found}$sql = "SELECT a.id, a.title, a.summary, a.category_id, a.member_id, c.name AS category, CONCAT(m.forename, ' ', m.surname) AS author, i.file AS ima.. 2024. 6. 28.
[p-book] article fetch(); // Get article dataif (!$article) { // If article not found include 'page-not-found.php'; // Page not found}$sql = "SELECT id, name FROM category WHERE navigation = 1;"; // SQL to get categories$navigation = pdo($pdo, $sql)->fetchAll(); // Get navigation categories$section = $article['ca.. 2024. 6. 28.
[p-book] category fetch(); // Get category dataif (!$category) { // If category not found include 'page-not-found.php'; // Page not found}$sql = "SELECT a.id, a.title, a.summary, a.category_id, a.member_id, c.name AS category, CONCAT(m.forename, ' ', m.surname) AS author, i.file A.. 2024. 6. 28.
[p-book] index fetchAll(); // Get summaries$sql = "SELECT id, name FROM category WHERE navigation = 1;"; // SQL to get categories$navigation = pdo($pdo, $sql)->fetchAll(); // Get navigation categories$section = ''; // Current category$title = '제목'; $description = '메타설명'; ?> "> " .. 2024. 6. 28.
PC에 XAMPP용 Imagick, ImageMagick 설치 하는법 여기대로 하니까 됨. (한국어로 바꿔놓고 했음)https://phpandmysql.com/extras/install-imagemagick-and-imagick-xampp/?utm_source=notesre&utm_medium=redirect IMAGEMAGICK 설치1. 필수 정보 얻기ImageMagick을 설치하려면 Windows 버전이 32비트인지 64비트인지 알아야 합니다.확실하지 않은 경우 Windows 시작 메뉴로 이동하여 설정 > 시스템 > 정보를 선택하여 정보 설정을 엽니다.장치 사양 제목 아래의 시스템 유형은 버전이 32비트인지 64비트인지를 나타냅니다.2. 소프트웨어 다운로드ImageMagick을 다운로드하려면 http://imagemagick.org 다운로드 페이지로 이동하세요 . 귀하.. 2024. 6. 27.