Html & Css

Chuyển đổi text có string url thành thẻ url

Với việc chuyển đổi 1 đoạn text thành link. Cakephp có hỗ trợ ở đây: http://book.cakephp.org/2.0/en/core-libraries/helpers/text.html Với javascript, có thể sử dụng thư viện js https://github.com/gregjacobs/Autolinker.js Ví dụ ở đây: http://greg-jacobs.com/Autolinker.js/examples/live-example/

Cakephp

Dowload hoặc create file pdf trong cakephp3 sử dụng cakepdf

Link doc : https://github.com/FriendsOfCake/CakePdf- Yêu cầu :  – PHP 5.4.16+ – CakePHP 3.0+ – wkhtmltopdf Cài đặt wkhtmltopdf  : sử dụng Composer composer require friendsofcake/cakepdf Thêm code vào file config/bootstrap.php // load CakePdf Plugin::load(‘CakePdf’, [‘routes’=>true,’bootstrap’ => true]); // cấu hình CakePdf (có thể thêm các yeu to khác trong link doc) Configure::write(‘CakePdf’, [ ‘engine’ => [ ‘className’ => ‘CakePdf.WkHtmlToPdf’, // Path trên server và server…

Continue Reading