Fatal error cannot redeclare get_cli_args lỗi năm 2024
I'm working on a website for someone, and everything was going fine until I tried to add a second google font theme to a "theme customizations" custom/functions.php file (from a plugin), and when I tried to publish it I got this message: Show Fatal error: Cannot redeclare wpsites_google_fonts() (previously declared in /home/content/a2pnexwpnas03_data03/45/3343945/html/wp-content/plugins/theme-customisations-master/custom/functions.php:21) in /home/content/a2pnexwpnas03_data03/45/3343945/html/wp-content/plugins/theme-customisations-master/custom/functions.php on line 27 And now I can't access any pages on the site or go back into my admin dashboard anywhere to fix it! :( Any help to fix it would be immensely appreciated! 1 AnswerYeah, just in case drag the plug in to your desktop and save there (but am sure yo can just reinstall later) then delete that plug in. Once you remove it everything should be back to normal. You wouldn't need FileZilla once you are done but if you are planning on developing more sites you will need something like FileZilla so no Harm in having it. If in any case that doesn't work then you will need to go into the function.php and remove that extra copy of the code but I don't think you will need to, Trong quá trình sử dụng mã nguồn WordPress đôi khi bạn sẽ gặp các lỗi phát sinh và làm cho website chỉ hiện lên mỗi thông báo lỗi chung chung như
Nguyên nhân dẫn đến lỗi: PHP Fatal error: Cannot redeclare true_plugins_activatePhân tích bản ghi lỗi trên ta có thể thấy do hàm
Trong đoạn mã trên ta có thể thấy có một tệp được gọi đến có tên Các xử lý lỗi: PHP Fatal error: Cannot redeclare true_plugins_activateTrước tiên ta cần vô hiệu hoá plugin
Sau khi đã vô hiệu hoá plugin này xong chúng ta cần xoá nội dung mã độc đã thêm vào file
Author Bio
Chào mọi người, mình là Kiên - hiện đang công tác tại Phòng Kỹ thuật AZDIGI. Trong quá trình làm việc mình có cơ hội được tiếp xúc với khá nhiều các vấn đề liên quan đến Website/Hosting/VPS/Server, do đó mình viết lại các hướng dẫn này nhằm chia sẻ kiến thức, cũng như tạo một môi trường để chúng ta giao lưu và học hỏi lẫn nhau, trau dồi thêm nhiều kiến thức bổ ích hơn nữa. |