Today when I do update plugins on my WordPress site I met the following error screenshot. I searched curl error codes and found it caused by SSL. The error message is: Problem with reading the SSL CA cert (path? access rights?).
Today when fix bug for a client I found one of its database table has duplicate records and that cause plugin error.
See the following screenshot the pdf_id and cat_id fields there are duplicate records.
In some case you need format users’ input. Here are some samples that only allow letters, numbers or spaces in PHP. The samples use preg_replace to remove invalid chars.
In php if you call json_encode it will add slashes to your sting, but if you want to use update_optionn just want url without slashes. Here is a easy to let you remove slahes in json
In some case you want to make the array with a random order so when use open a page it may see different contents. The following content tell you how to make that. In fact it is about how to shuffle PHP array with key.
You need to know how to get week, month start and end timestamps in php when want to query new users, posts or other datas that happen in today, this week or this month. The following codes will help you.
Timestamps of Today:
If you unserialize an object of a class that hasn’t been included yet then you will get a __PHP_Incomplete_Class object. A PHPIncompleteClass object can’t be accessed directly, but we can do some conversation to visit it like a object. The following will tell you how to access __php_incomplete_class