How-to articles, tricks, and solutions about PHP
Codeigniter Rename file on upload
In CodeIgniter, you can rename a file on upload by using the do_upload() method of the Upload class.
PHP/regex: How to get the string value of HTML tag?
In PHP, you can use the preg_match() function to extract the string value of an HTML tag.
Creating new Date Time from string
In PHP, you can use the DateTime class to create a new date and time object from a string.
create folder in laravel
In Laravel, you can create a new folder using the File facade's makeDirectory method.
Composer: remove a package, clean up dependencies, don't update other packages
To remove a package with Composer, you can use the command composer remove [package-name].
proper way to logout from a session in PHP
To properly log out of a session in PHP, you can use the session_destroy() function.
Warning: mysqli_connect(): (HY000/2002): No such file or directory
This error message is indicating that there is a problem connecting to the MySQL server.