WordPress, Laravel, ExpressionEngine, CakePHP Developer
If you are facing Email sending problem like “Invalid HELO name” or “Helo command rejected: need fully-qualified hostname”. From WHM => Turn off the “Require RFC-compliant HELO” option under “WHM Main >> Service Configuration >> Exim Configuration Manager” Then the first thing first is your hostname. It is your hostname which is not fully-qualified domain … Continue reading
A session is a set of data that is stored on the server, usually as key-value pairs. A session is assigned a pseudo-random, secret ID that is usually stored in the user’s browser using a cookie, for example SESSID=abcdef123456789. The session ID typically matches the name of a file containing the session data on the … Continue reading
final keyword is used in PHP as final class and final method. A final class is one which cannot be extended. A final method cannot be overridden in extended class.
If the instance of your class is rarely needed, you can have the static method create an instance, call the non-static method and return the value.
We can easily use multiple traits with duplicate method name with instance of like as follow
Primary Key is used to identify a row (record) in a table, whereas Unique-key is to prevent duplicate values in a column (with the exception of a null entry). By default SQL-engine creates Clustered Index on primary-key if not exists and Non-Clustered Index on Unique-key. Primary key does not include Null values, whereas Unique-key can. … Continue reading
Sometimes we need to check whether a remote files exist or not? Most of the time we need it for remote image. We can do it very easily in PHP (v >=5.3.0 ), here is the sample code. $file_headers = @get_headers( ‘http://example.com/image.jpg’ ); if( strpos( $file_headers[0], ‘ OK’ ) !== false ){ // THE IMAGE … Continue reading