May 5, 2016
If you are using XAMPP to do PHP development and you want to test your pages on your iPhone, you will need to:
Your local IP address will be something like 192.168.2.21.
ipconfig. You’re looking for the IPv4 Address.
ifconfig | grep "inet " | grep -v 127.0.0.1. It will be be the first address after “inet”.
Once you know the IP address, on your mobile device, open a browser and point it to http://192.168.2.21 (change to use your IP address). If you’re using a Mac, that should work. If you’re using a PC, your likely to get a 403 error, like this one:
You may get a 403 error when you navigate to your Windows’ web server from your mobile device. If you do, you need to make a small change in the httpd-xampp.conf file:
Require all localto
Require all granted.
Related Training: PHP