Show wordpress locally in xammp and in iPhone via ip

You can adapt the site url which is stored in the database based on what domain you are viewing the site from. Add the following to wp-config.php:

define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/yourwebsitename' );
define( 'WP_SITEURL', WP_HOME );

If you use a subdirectory install (ie: you view the site from http://192.168.0.2/yourwebstename but the WordPress core files are stored in http://192.168.0.2/yourwebstename/wp (or similar), you will need to add this to the second line:

define( 'WP_SITEURL', WP_HOME . '/wp' );