[PHP] Fix CaptSecImg.php Error in imagettfbbox function (2022)
![[PHP] Fix CaptSecImg.php Error in imagettfbbox function (2022)](https://www.tapopo.net/photo/content/168.jpg)
2022-09-21 13:59:55
This is way to fix directory font file including PHP calling class in new version. You can replace the code in the remark line as shown below. ...2022-09-21 13:59:55
This is way to fix directory font file including PHP calling class in new version. You can replace the code in the remark line as shown below. ...2019-08-21 12:00:01
if( @getimagesize($image_url) ) { return true; } else { return false; } ...2019-02-25 15:48:24
จากที่ก่อนหน้านี้ (ปลายปี2018) ทางธนาคารแห่งประเทศไทย (ธปท) ได้พัฒนา API Exchange Rate จากเวอร์ชั่นเก่า มาเป็นตัวใหม่ ส่งผลให้ Application ของเว็บไซ์ที่เคยเขียนไว้ ไม่สามารถเชื่อมต่อ API ตัวเดิมได้ ดังนั้นเราจะมาลองเชื่อมต่อ API ...2018-07-06 15:32:38
Set config php.ini max_input_vars = 1000 *Default at 1000 fields If you want to define many IN condition with sql command (MySQL) If you want to POST these values (very many fields) to the sql statement via IN ...2018-05-18 00:57:15
PHP Export excel alert: Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): __ Warning: fopen(): Filename cannot be empty in __ Insert this code on export page: error_reporting(E_ERROR ...2018-02-28 17:53:01
PHP error log: PHP Fatal error: Uncaught PHPExcel_Writer_Exception: Could not open ____ for writing. in C:\___Dir___wwwClassesPHPExcelWriterExcel2007.php:234 Stack trace: #0 C:\___Dir___wwwcommonget_report.php(331): ...2017-07-26 16:33:04
Split word by space or plus character to array. $arr = preg_split("/[s,+]/", trim($_GET['text_search'])); And call function markWord for replace hightlight styles. function markWord($arr,$str) { ...2017-03-13 17:00:25
<?php ini_set('max_execution_time', 300); //300 seconds = 5 minutes /* connect to notes */ $hostname = '{mail.yourhost.com/imap/ssl}INBOX'; $username = 'xxx@yourhost.com'; $password = 'xxx'; /* ...2017-03-08 11:20:30
function remTag($text) { $text = strip_tags($text, '', <p>); // Kill all except <p> tag $text = preg_replace('#<p class="some">(.*?)</p>#', '', $text); // Remove ...2017-01-11 17:57:50
PHP ฟังก์ชั่นสำหรับจัดการกับ single quote (') ก่อนที่จะ insert ลงฐานข้อมูล function string_sanitize($s) { $result = str_replace(" ' ", " ' ' ", $s); return ...2016-11-29 15:40:42
In case user enters text and press enter for new lines into textarea of form. Break line won't insert to database. So this way to make easy the line breaks within database. This is line This is line This is line $text ...2016-09-29 22:58:43
เป็น PHP ฟังก์ชั่น ที่ใช้สำหรับแบ่งหน้า ในกรณีดึงข้อมูลมาแสดงเป็น Item list พร้อมกับ css จัดรูปแบบเพื่อความสะดวกใช้งาน pagination.php <?php function displayPaging( $total, $limit, $pagenumber, $baseurl, ...2016-09-26 13:10:36
PHP โค้ดสำหรับฟอร์มอับโหลดไฟล์ หลายไฟล์ โดยมีการตรวจสอบนามสกุลของไฟล์ และจำกัดขนาด size พร้อมกับเช็ค error ขณะอับโหลด HTML <form action="file_upload.php" method="post" enctype="multipart/form-data"> <input ...2016-09-15 12:20:01
In the newer PHP3 is not supported. Errors caused by the variable declaration without single or double quote. <?php $id = $_GET[id]; ?> Error reporting Notice: Use of undefined constant id - assumed ...2016-09-09 17:00:27
PHP Script for random one of array key <?PHP $text = array(); $text[] = 'Content 1'; $text[] = 'Content 2'; $text[] = 'Content 3'; echo $text[ array_rand($text,1) ]; ?> If you want ...2016-09-09 11:15:25
The PHP script including condition terms before loaded content. If the condition is false The script will redirecting back to the login page with location parameters. Main page (index.php) <?php if ...2016-08-10 17:01:45
การดึงภาพและข้อมูลอื่นๆที่เกี่ยวข้องจาก board ในเว็บไซต์ Pinterest นั่น เราสามารถทำผ่าน API ที่เขาจัดเตรียมไว้ให้ ซึ่งวิธีการนั้นง่ายมากๆ ครับ แต่ก่อนอื่นคุณเป็นเป็นสมาชิกของ pinterest ก่อนนะ แล้วเข้าไปที่ 1. เข้าไปที่หน้า https://developers.pinterest.com/ ...2016-08-09 19:10:34
1. ลำดับแรกคุณต้องมี Account ของ Instagram ก่อนนะครับ จากนั้นเข้าไปที่หน้านี้เลย https://www.instagram.com/developer 2. จากนั้นเลือก Manage Clients และกดปุ่ม Register a new client 3. กรอกรายละเอียดที่จำเป็น ...2015-09-20 12:37:42
PHP script สำหรับตรวจสอบข้อความ เช็คตัวอักษร ว่าเป็นอักษรไทย และวรรณยุกต์ หรือไม่ <?PHP if(!ereg('^[ก-์ ะ-ู เ-แ]+$', $text)) { // Something ...2015-03-06 11:35:06
Fix for IE And SSL Secure 1. If isset session_start(); put before if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { session_cache_limiter("public"); } session_start(); 2. ...2015-01-24 14:20:22
PHP ใช้แปลง date เป็นเดือนไทย พ.ศ. $month_arr=array( "1"=>"มกราคม", "2"=>"กุมภาพันธ์", "3"=>"มีนาคม", ...2015-01-10 15:08:53
PHP remove text or not numbers from string preg_replace("/[^0-9]/","",'099-777-999xxx-abc55'); output: 09977799955 ...2014-09-26 16:42:14
php ใช้สำหรับลบ string ออกจากตัวเลข เหลือไว้แค่ ตัวเลข 0-9 และ จุดทศนิยม (.) เหมาะกับการนำไปทำ PHP Validation <?php $strNumber = "4/B.2T322,15T"; $number = preg_replace( ...2014-09-23 15:01:08
PHP strip_tags เป็นฟังก์ชั่นตัด html tag ให้เหลือไว้เพียง Content text ที่อยู่ภายใน tag นั้น <?php $text = '<p>Test paragraph + <span style="color:red">Read more</span></p> <a href="#"><b>link</b></a>'; echo ...2014-07-23 14:54:36
PHP ฟังก์ชั่น หาจำนวนวัน จาก 2 Date function datediff ( $start, $end ) { $datediff = strtotime(dateform($end)) - strtotime(dateform($start)); return floor($datediff / (60 * 60 * 24)); } function ...