All posts in PHP

PHP Storm key

  ====================================================================================================== Hướng dẫn fix lỗi “We could not validate your license xxxxxx” Windows: mở file host “C:\Windows\System32\drivers\etc\hosts”: Thêm vào dòng sau: 0.0.0.0 account.jetbrains.com Linux/Mac: mở /etc/hosts Thêm vào dòng sau: 0.0.0.0 account.jetbrains.com Sau đó các bạn restart lại phpstorm. Rồi nhập code lại nhé! ======================================================================================================== License server http://idea.wrbugtest.tk http://180.76.140.202:9123 . . . Read more

Unit test

https://www.startutorial.com/articles/view/phpunit-beginner-part-1-get-started Nhưng lưu ý thay PHPUnit_Framework_TestCase bằng PHPUnit\Framework\TestCase.   Nếu cài phpunit cho riêng project composer require –dev phpunit/phpunit ^6.0 thêm vào file test trước khi dùng: require __DIR__ . ‘/vendor/autoload.php’;

Debug PHP bằng Sublime text và Xdebug

PHPXdebug  Aug 29th, 2016 12:40 AM  3232 5 1  Report Debug code – chúng ta phải làm việc này rất nhiều. Viết code chạy một cách trơn tru ngay lần đầu tiên luôn thì rất là khó và chỉ có một số ít người (nếu có) làm được. Trong bài viết này, chúng . . . Read more

Test API Analytics

Làm theo hướng dẫn https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/web-php Tool: https://ga-dev-tools.appspot.com/account-explorer/ Các lỗi có thể xảy ra: Sai tên file client_secrects.json (nhớ là có s) Sai redirect uri, như trong ví dụ chỉ dành cho file nằm ở thư mục gốc, cần điền uri đúng Metrics & Dimension Explorer: https://developers.google.com/analytics/devguides/reporting/core/dimsmet

10 awesome things to do with cURL

cURL, and its PHP extension libcURL, are tools which can be used to simulate a web browser. In fact, it can for example, submit forms. In this article, I’m going to show you 10 incredible things that you can do using PHP and cURL. Acknowledgments New to cURL? If yes, check . . . Read more