Came across this today messing around with WAMP server. The index page it has has some images. I was looking to replace them as i was feeling lazy about creating an Index page
Posted on 09 January 2012.
Came across this today messing around with WAMP server. The index page it has has some images. I was looking to replace them as i was feeling lazy about creating an Index page
Posted in PHP0 Comments
Posted on 09 January 2012.
A couple of weeks ago I was going to work on a new project, it was a directory-like kind of app. One the things this application had to do was let users add their websites to their profiles, and so the first question came up, “how am going to get their website’s title and meta tags?”.
Posted in PHP0 Comments
Posted on 06 January 2012.
With object orientated languages came the concept of the try-catch block to better manage exceptions and application crashes, and from PHP 5 onwards, the popular web server-side scripting language too adopted this ideology.
Posted in PHP0 Comments
Posted on 06 January 2012.
Is there any function which replaces params in a string? Something like this:?
Code:
$format_str = "My name is %name."; /* this was set in a configuration file - config.php */
$str = xprintf($format_str, array(\'name\' => \'Joe\', \'age\' => 150)); /* above is somewhere in main code */
The expected value of $str after the operation is:
My name is Joe.
Posted in PHP0 Comments
Posted on 13 December 2011.
You can build really cool apps with API’s and most sites will send either JSON or XML back to your app, I prefer JSON actually but some of these API’s will only send XML and, while you can always convert XML to JSON, it’s always better to save that processing time.
Posted in PHP0 Comments
Posted on 12 December 2011.
Here is a cool trick you might not know if you want to return multiple values from a function and assign them to variables with different names each.
Posted in PHP0 Comments
Posted on 04 December 2011.
Recently I’ve become more and more interested in the .htaccess file as a way to speed up and protect your site. Previously here on WPShout I’ve written an “A to Z of WordPress .htaccess Hacks”, which has been a very popular post, and today we’re going to look at ten easy methods to speed up WordPress with the .htaccess file. Not all of these applyspecifically to WordPress; you could easily apply most of these to any other site.
Posted in .htaccess, PHP0 Comments
Posted on 03 December 2011.
Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change — hence permalink.
Posted in PHP0 Comments
Posted on 24 November 2011.
$myText = (string)$myVar;
There are more details for string casting and conversion in the Strings section of the PHP manual, including special handling for booleans and nulls.
Posted in PHP0 Comments
