Support download with resume in PHP

RequirementIn web application, we often need to provide file downloads. For small files, there is no...
Aug 04, 2020 PHP Comments 0

Insert string at specified position with PHP

Use PHP's substr_replace() method to insert a string into an existing string.  Refer to substr_repla...
Jul 15, 2020 PHP Comments 0

Generator random string with PHP

Two ways to generate random strings using PHP.1. With rand methodfunction generateRandomString($leng...
Jul 13, 2020 PHP Comments 0

Include OpenSSL support of php 5 in Mac OS

IssueUsing the openssl_encrypt() method in Mac OS, something went wrong.Call to undefined function o...
Jul 07, 2020 PHP Comments 0

Enable php_mbstring in PHP

IssueIn the PHP code, using the mb_strlen method, an error outputs as bellow.Call to undefined funct...
Jul 06, 2020 PHP Comments 0

Linux make php 5 error: dereferencing pointer to incomplete type ‘X509_EXTENSION’

IssueWhen compiling PHP 5 version in Linux, enable openssl extension. Run the following commands.$ ....
Jul 05, 2020 PHP Comments 0

Check if folder is empty or not php

Because PHP's rmdir method can only delete empty folders, you need to determine whether the folder i...
Jul 03, 2020 PHP Comments 0

Cannot find autoconf when running the phpize command

IssueIn order to debug php-7.4.7 with phpstorm. I download the xdebug source, and run the following ...
Jul 01, 2020 PHP Comments 0

Detect the execution is from CLI mode in PHP

In PHP, there are two ways to determine if the current invocation is from CLI.With php_sapi_name met...
Jun 05, 2020 PHP Comments 0

PHP configure error Package requirements (oniguruma) were not met

QuestionOn Linux/Mac systems, using PHP 7.4.6 to call mb_convert_encoding will cause a fatal error.E...
May 30, 2020 PHP Comments 0