Files
bestpc/README.md

67 lines
2.5 KiB
Markdown
Raw Normal View History

2025-05-27 14:28:47 +07:00
<h1>Hướng dẫn</h1>
2025-05-27 14:31:20 +07:00
<p>Repo: <a href="https://repo.hurasoft.com/tieptk/bestpc" target="_blank">https://repo.hurasoft.com/tieptk/bestpc</a></p>
2025-05-27 14:28:47 +07:00
2025-05-27 14:31:20 +07:00
2025-05-27 14:28:47 +07:00
<h2>Cài đặt hệ thống</h2>
<p>Test và làm việc chính tại web: <a href="http://local.bestpc_vn/"> http://local.bestpc_vn/</a> </p>
<ul>
<li>Tải phần mềm XAMPP tại <a href="https://www.apachefriends.org/download.html" target="_blank">https://www.apachefriends.org/download.html</a> để chạy PHP</li>
<li>Chỉnh file hosts trong máy tính C:\Windows\System32\drivers\etc\hosts:
<pre><code>
127.0.0.1 local.bestpc_vn
</code></pre>
</li>
<li>
Cài đặt ../xampp/apache/conf/extra/httpd-vhosts.conf của apache trong XAMPP
<pre><code>
&lt;VirtualHost *:80&gt;
DocumentRoot "/thuc-muc-check-out/bestpc_vn"
ServerName local.bestpc_vn
&lt;Directory "/thuc-muc-check-out/bestpc_vn/"&gt;
Require all granted
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
</code></pre>
</li>
<li>
Cài đặt ../xampp/apache/conf/httpd.conf của apache trong XAMPP
<pre><code>
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
AllowOverride All
</code></pre>
</li>
</ul>
<h2>Cấu trúc thư mục</h2>
<ul>
2025-05-27 14:31:20 +07:00
<li>/old: thư mục chứa các file cũ của Tiệp đã cắt</li>
2025-05-27 14:28:47 +07:00
<li>/template: các file template html chia theo module/view</li>
<li>/pages: cung cấp dữ liệu cho template và hiển thị dữ liệu trên template qua code Liquid <a href="https://shopify.github.io/liquid/" target="_blank">https://shopify.github.io/liquid/</a></li>
<li>/public_html: Code public</li>
<li>/public_html/assets: lưu các file ảnh/css/js dùng cho giao diện</li>
<li>/package: thư viện code PHP hỗ trợ</li>
<li>/src: các code PHP hỗ trợ</li>
</ul>
<h2>Cài đặt Composer (dùng tải package của PHP)</h2>
<p>Xem hướng dẫn: <a href="https://getcomposer.org/doc/00-intro.md#installation-windows" target="_blank">https://getcomposer.org/doc/00-intro.md#installation-windows</a> </p>
<p>Sau khi cài đặt xong. Mở cmd của Windows và thao tác lệnh sau để cài các thư viện code PHP cần cho dự án này.</p>
<pre><code>
> cd /thuc-muc-check-out/bestpc_vn/package
> composer i
</code></pre>