Diễn đàn WapBuilder Hướng dẫn tích hợp Upload file lên hosting cho code Dorew GS

Hướng dẫn tích hợp Upload file lên hosting cho code Dorew GS

2,077 lượt xem
07/01/2023 08:30 Bình luận (0)
1. Sử dụng File manager của host
- Tạo thư mục: /assets/system/upload/

- Truy cập /libs/dorew/, tạo tập tin UploadFile.php, dán code:
=>https://github.com/dorew-site/dorew-site/wiki/UploadFile.php

- Sửa file index.php thành:
=>https://github.com/dorew-site/dorew-site/wiki/index.php---upload-file

2. Sử dụng trình điều khiển /cms
- Mở file app.js.get tìm và thêm đoạn:

...
{#============================================================================#}
{% if app == 'file-sys' and get_get('input')|trim != null %}
{{upload_from(get_get('input')|trim)|raw}}
{#============================================================================#}
{% elseif app == 'main' %}
...


- Sửa file view-file thành:
=>https://github.com/dorew-site/dorew-site/wiki/view-file-sys

- Mở file _manager, tìm block upload_file và sửa thành:
=>https://github.com/dorew-site/dorew-site/wiki/block-upload_file

4. SQL

CREATE TABLE `file` (
    `id` int(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
    `time` int(11) NOT NULL,
    `filename` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `filepath` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `filesize` int(11) NOT NULL,
    `type` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal',
    `author` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sei',
    `status` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'private',
    `price` int(11) DEFAULT NULL,
    `saleoff` int(11) DEFAULT NULL,
    `condition` int(11) DEFAULT NULL,
    `mua` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `blogid` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Trùm Phụ, Mèo Đi Lạc đã thích bài viết này
BÌNH LUẬN (0)

Viết bình luận

Vui lòng đăng nhập để tham gia bình luận.

Trang chủ Tìm kiếm Trò chuyện Đăng nhập