- Chú ý phiên bản PHP mà bản phalcon muốn cài hỗ trợ (Xampp chỉ có bản 32 bit mà thôi)
- Check phiên bản PHP threadsafe hay nonthreadsafe bằng lệnh php -i|findstr "Thread" để chọn bản phalcon và psr hỗ trợ (sau khi cài đặt biến môi trường cho PHP)
- Chú ý các cấu hình sau trong phpinfo
+ Architecture 64 hay 32
+ Compiler MSVC15 (Visual C++ 2017)'
Sữa lỗi load Controller khi mới tạo project ở Phalcon 4
StoreController handler class cannot be loaded
thành
#0 [internal function]: Phalcon\Mvc\Dispatcher->throwDispatchException('StoreController...', 2)
#1 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#2 E:\wamp64\www\store\public\index.php(43): Phalcon\Mvc\Application->handle('/store/')
#3 {main}Vào file /public/index.php
Nếu là project có nhiều modules thì vào thư mục app mở file bootstrap_web.phpsữa echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
echo $application->handle($_GET['_url'] ?? '/')->getContent();
Không có nhận xét nào:
Đăng nhận xét