How-to articles, tricks, and solutions about PHP
This error message is typically caused by a problem with the file path specified in the "require" or "include" statement.
It looks like you are trying to access a property of an object that has not been defined.
Here is an example of how to remove an object from an array of objects in PHP:
PHP is a programming language that is often used to build web applications.
To disable the strict standards error in PHP 5, you can add the following line at the top of your PHP script:
It looks like you are encountering an error related to a missing VCRUNTIME140.dll file when using PHP 7.
To append one array to another in PHP, you can use the array_merge function.
This error message is indicating that the PHP script, "artisan," is attempting to run a database migration command, but the database server is denying access to the user "laravel" on the "localhost" location.
You can use the range method of the Carbon class in PHP to get all the dates between a specific date range.
To check if a URL parameter exists in PHP, you can use the isset function.
You can use the global keyword to access a global variable inside a class.
There are a few things that can cause errors to not be logged when running PHP from the command line interface (CLI).
To get the selected text of a combo box (also known as a dropdown menu or select box) in PHP, you can use the following code:
This error can occur when the composer process is trying to allocate more memory than is available to it.
The error message "SQLSTATE[HY000] [2002] Connection refused" typically indicates that the client was unable to establish a connection to the database server.
To convert a string to its hexadecimal representation, you can use the bin2hex function in PHP.
There are several libraries available in PHP that can be used to create PDF invoices, such as TCPDF and FPDF.
To send a DELETE request with PHP using cURL, you can use the following code:
You can add a custom User Agent value to a cURL request in PHP using the CURLOPT_USERAGENT option.
If cURL is returning a HTTP code of 0, it usually indicates that cURL was unable to communicate with the server.
To make an HTTP PUT request using PHP's cURL functions, you can use the following snippet:
You can use the if statement in PHP to check if two conditions are true.
This error typically occurs when you are trying to call a function, but you are not passing a string as the name of the function.
There could be a few reasons why the exec() function in PHP is not executing the command as expected.
The exec(), system(), and passthru() functions are all used to execute external programs in PHP.