Archive for the ‘PHP’ Category
how to remove .svn from all folders – command line
find . -name ".svn" -exec rm -rf '{}' \;
Recognize Ajax Request (XMLHttpRequest)
To recognize Ajax Request (Prototype/JQuery) in PHP you can use following code:
function xhr() {
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
$_SERVER ['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest';
}
PHP Frameworks
If you’re wondering which PHP framework will work for you or you’re getting headache by just thinking about them you should take a look on this article. There is also quick overview of 10 most popular frameworks here. I personally like Symfony.
Symfony javascript helpers doc
There is new doc about javascript (AJAX) helpers on Symfony website. Also if you’re an AJAX fan you should see how Symfony plays with JSON. You can read more about JSON format here.