What is /var/www/html? [closed]

In the most shared hosts you can’t set it. On a VPS or dedicated server, you can set it, but everything has its price. On shared hosts, in general you receive a Linux account, something such as /home/(your username)/, and the equivalent of /var/www/html turns to /home/(your username)/public_html/ (or something similar, such as /home/(your username)/www) … Read more

Check if a PHP cookie exists and if not set its value

Answer You can’t according to the PHP manual: Once the cookies have been set, they can be accessed on the next page load with the $_COOKIE or $HTTP_COOKIE_VARS arrays. This is because cookies are sent in response headers to the browser and the browser must then send them back with the next request. This is … Read more

Why I get “ERR_RESPONSE_HEADERS_TOO_BIG” on chrome?

The following code is executed correctly on firefox, but not on Chrome. The later always displays “ERR_RESPONSE_HEADERS_TOO_BIG”. This error occurs when I iterate through a folder containing more than 10000 items (files) – it must be long task. Please can anyone explain me how to avoid this error? The error disappears if I “echo”-ing something … Read more

Check if URL has certain string with PHP

I would like to know if some word is present in the URL. For example, if word car is in the URL, like www.domain.com/car/ or www.domain.com/car/audi/ it would echo ‘car is exist’ and if there’s nothing it would echo ‘no cars’.

The character encoding of the HTML document was not declared

When I click on my form’s submit button the following error message appears: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)