Month: March 2021

Linux 將 BIG5 文字檔轉成 UTF-8 格式 – Nothing but..

自從日常的桌面環境從 Windows 轉到 Linux 後,時常會發現原本的文字檔在 terminal 裡變成亂碼,這是因為以前使用 Windows 沒有養成把檔案存成 unicode 的習慣,因此下面就來說明如何將大量的 BIG5 文字檔轉成 UTF-8 格式的文字檔 將 BIG5 文字檔批次轉成 UTF-8 格式 首先檢查資料夾底下的文字檔格式 file *.txt Bash Copy # 執行結果: a.txt: UTF-8 Unicode…

How to Add Watermark in Image using PHP | Webslesson

Source Code index.php <?php //index.php $connect = new PDO("mysql:host=localhost;dbname=testing", "root", ""); $message = ''; if(isset($_POST["upload"])) { if(!empty($_FILES["select_image"]["name"])) { $extension = pathinfo($_FILES["select_image"]["name"],PATHINFO_EXTENSION); $allow_extension = array('jpg','png','jpeg'); $file_name = uniqid() . '.' .…