Hướng dẫn php tokenizer extension windows

  • Introduction
  • Installing/Configuring
    • Requirements
    • Installation
    • Runtime Configuration
    • Resource Types
  • Predefined Constants
  • Examples
  • PhpToken — The PhpToken class
    • PhpToken::__construct — Returns a new PhpToken object
    • PhpToken::getTokenName — Returns the name of the token.
    • PhpToken::is — Tells whether the token is of given kind.
    • PhpToken::isIgnorable — Tells whether the token would be ignored by the PHP parser.
    • PhpToken::__toString — Returns the textual content of the token.
    • PhpToken::tokenize — Splits given source into PHP tokens, represented by PhpToken objects.
  • Tokenizer Functions
    • token_get_all — Split given source into PHP tokens
    • token_name — Get the symbolic name of a given PHP token

There are no user contributed notes for this page.

Change language:

Submit a Pull Request Report a Bug

These functions are enabled by default. You can disable tokenizer support with --disable-tokenizer.

The Windows version of PHP has built-in support for this extension. You do not need to load any additional extensions in order to use these functions.

+add a note

User Contributed Notes

There are no user contributed notes for this page.

1. Yêu cầu trước khi cài đặt
2. Hướng dẫn cài đặt
3. Cấu hình
- 3.a. Cài đặt trên server
- 3.b. Đối với dịch vụ share-host


1. Yêu cầu trước khi cài đặt:

- PHP ^7.3|^8.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension

2. Hướng dẫn cài đặt:
Bước 1:Tải S-Cart  ở đây

SCart-folder/
├── app
├── databases
├── public
│     ├── index.php
│     └── install.php
├── resources
└──...

Bước 2: Xét quyền ghi cho các thư mục và thư mục con của nó: vendor, storage, public/data
Bước 3: Cài đặt vendor (Nếu mã nguồn chưa có thư mục vendor)
Di chuyển vào thư mục S-Cart, chạy dòng lệnh:

php composer.phar install

Sau khi cài đặt vendor thành công, thư mục "vendor" sẽ xuất hiện

Hướng dẫn php tokenizer extension windows


Bước 4:
Tạo database
Bước 5: Tạo virtual host, sau đó trỏ domain tới thư mục s-cart-folder/public
Bước 6: Sau đó, truy cập đường dẫn your-domain.com/install.php để cài đặt tự động.

Video cài đặt S-Cart tự động:

(Nếu việc cài đặt S-Cart tự động thất bại, bạn có thể xem hướng cài đặt thủ công bên dưới.)
Bước 6: Xóa hoặc đổi tên file public/install.php để người khác không truy cập được.
Video hướng dẫn: TẠI ĐÂY

Cách cài đặt thủ công:

- Bước 1: Tạo database , sau đóimport file .sql  trong thư mục database hoặc /vendor/s-cart/core/src/DB/s-cart-yyyy-mm-dd.sql vào database.
- Bước 2: Đổi tên hoặc xóa file public/install.php
- Bước 3: Copy file .env.example thành .env nếu file .env chưa có sẵn.
- Bước 4: Tạo API key nếu APP_KEY trong file .env rỗng. 
 Dùng lệnh "php artisan key:generate"
- Bước 5: Tạo cặp khóa mã hóa. 
 Dùng lệnh "php artisan passport:keys"
-Bước 6: Cấu hình các giá trị trong file .env:
APP_DEBUG=false (Sét giá trị là false để bảo vệ thông tin website)
DB_HOST=127.0.0.1 (Địa chỉ server database)
DB_PORT=3306 (Port của database)
DB_DATABASE=s-cart (Tên dữ liệu của bạn)
DB_USERNAME=root (Tên người dùng kết nối dữ liệu)
DB_PASSWORD= (Mật khẩu người dùng dữ liệu)
APP_URL=http://localhost (đây là url website của bạn)
ADMIN_PREFIX=sc_admin (Đường dẫn tới Admin)
DB_PREFIX=sc_ (Phải là "sc_" vì nó đã được cố định trong file .sql l)

Video cài hướng dẫn cài đặt thủ công:

3. Cấu hình
- Sét quyền ghi cho thư mục và thư mục con của nó: vendor, storage, public/data, app/Plugins
- Cần đảm bảo vhost của website trỏ tới thư mục public.
- Link admin: your-domain/sc_admin. Tài khoản/mật khẩu mặc định admin/admin.

3.a. Cài đặt trên server
(*) Vui lòng chắc chắn rằng virtual host của bạn trỏ tới thư mục public của s-cart. Bạn có thể tham khảo việc cấu hình vhost như bên dưới:
Cho websever Nginx:

server {
        listen 80;
        root /home/domain/you-domain.com/public/;
        index index.php index.html index.htm;
        server_name your-domain.com;
        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}

Cho websever Apache

 ServerAdmin your-domain.com
 DocumentRoot "C:\xampp\htdocs\s-cart/public"
 ServerName your-domain.com

3.b Đối với dịch vụ share-host:  
Vì bạn không có quyền chỉnh sửa trên server, vì vậy trước khi cài đặt SCart, hãy liên hệ với nhà cung cấp.
Phải chắc chắn dịch vụ hosting bạn đang sử dụng hỗ trơ website xây dựng bằng Laravel (là nền tảng của SCart).
Website bắt buộc phải trỏ tới thực mục "Folder-SCart/public".