Get basename and file extension with PHP or Javascript
Getting file extension and basename is a common development task. PHP internal function pathinfo is very useful. But, Windows paths will not work correctly on Linux servers and vice versa.…
Getting file extension and basename is a common development task. PHP internal function pathinfo is very useful. But, Windows paths will not work correctly on Linux servers and vice versa.…
http is a stateless protocol. A way to remember information from page to page is to use cookies. According to Wikipedia: A cookie, also known as an HTTP cookie, web…
It is useful to prevent direct access of AJAX calls (from browser address bar). A solution could be the following simple function check_is_ajax(): /** * Check if request is an…
The term "localization" is used as a synonym of "internationalization", which is the most proper term. Sometimes, internationalization is shortened to "i18N" (meaning "i - eighteen letters -n"). gettext is…
Date manipulation is a common and extremely useful development task. It was never easy with PHP, until PHP5 and DateTime class. There are many cases you need to convert dates.…