Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I make mobile optimized websites and I develop websites on my Windows 7 Desktop. Whenever I want to see any .html file on iphone to check compatibility I upload the file to an online FTP then I open the file from that url.

But the whole thing takes so long each time.

I've got XAMPP installed but no wifi on my desktop - just on the router.

Is there any way to open on iPhone's Safari browser a .html file located at my PC's Desktop?

share|improve this question
2  
This might be better of Super User. The main setup and work will be done on the PC, not the iPhone. –  Nathan Greenstein Apr 12 '11 at 17:54
1  
@nathan +1 for Super User –  nuc Apr 12 '11 at 17:57
    
I generally agree that this is a Windows question. Not an Apple question. The question is how to serve web content on a Windows Desktop. –  Jason Salaz Apr 12 '11 at 23:43
1  
My question is not how to install web server on PC, I know this I'm using XAMPP from 2-3 years. my question is there any specific things to run local from iphone. my iphone is not directly connected to my PC. I don't have wireless card on my PC. I'm having wireless router. to use internet on my ipad and iphone using wi-fi –  Metal Gear Apr 13 '11 at 4:25
add comment

5 Answers 5

up vote 1 down vote accepted

XAMPP has long since been a staple of simple personal web hosting by Windows-using friends' of mine. Allow me to repeat this, I have NEVER used XAMPP myself, it only comes recommended by friends of mine.

This gist of this process is that you need a web server running on port 80 on your desktop machine. And you also need to know what it's internal IP addresses is.

Assuming you use XAMPP, download it, get it installed and configured to run on port 80. Check to ensure Windows Firewall opened up port 80 for it. Next, drop your web files into XAMPP's web serving directory.

Then, fire up your iPhone, and open Safari. Browse to your computer's IP address / index.html or the file's given filename. (Ex: 192.168.0.8/page.html)

share|improve this answer
    
but how my iphone will open my computer's ip address. it's not connected on LAN –  Metal Gear Apr 13 '11 at 5:00
    
How do you use FTP to upload files if your computer isn't connected? –  Jason Salaz Apr 13 '11 at 5:24
    
I think he's saying (hopefully he'll correct me if I'm wrong) that his phone isn't on his network. If his network is wired-only, that makes perfect sense. –  Ben Wyatt Apr 13 '11 at 12:43
    
Ah, that makes sense. Atypical, but sensical. –  Jason Salaz Apr 13 '11 at 16:30
add comment

If you're willing to install ruby (already installed by default on OS X), you might want to check out Annyong. You can basically point it at any folder and tell it to serve it on an odd port.

If python is more your style (also installed by default on OS X), you can simply type python -m SimpleHTTPServer to serve the current directory on port 8080.

Otherwise, I sometimes use Dropbox for quick transfer to my iOS stuff.

share|improve this answer
add comment

You can install Microsoft's Internet Information Server on Windows 7 and then ensure your HTML files land in IIS's root directory. From there, it should be trivial to view them on your iPhone.

Of course, there are other web server options such as Apache, but IIS is pretty much the standard in Microsoft-land and you'll probably find it easier to set up and troubleshoot, particularly given that your needs are minimal.

share|improve this answer
add comment

WAMP is the "easiest" solution, if you don't have experience with running a local webserver.

http://www.wampserver.com/en/

share|improve this answer
add comment

Short answer is no. There is nothing special you can do on iPhone's Safari to access a file on your desktop - not even using the USB cable.

That's the on topic answer, to this website. That being said...

Your best bet is connecting through wifi. Supposedly you could also use bluetooth or even USB, but for both you would sure need to jailbreak and I wouldn't bother even trying because I suppose any of them would be quite troublesome because most developers wouldn't bother doing something in those lines and because none of the two are meant to give direct access files remotely - just for copying over.

If you don't have a web server, grab any from other answers, such as XAMPP (my favorite), Annyong or even using Python, and make sure it's running on the desktop through your own desktop web browser pointing to url http://127.0.0.1 or simply localhost, which is a shortcut.

Then make sure your iPhone is on the same network and point your Safari to your computer's IP. Doesn't matter your desktop doesn't have wifi. For instance, if they're connected to the same router, by default they'll have similar IPs and same mask which will allow them to see each other on that same Local Area Network.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.