简体   繁体   中英

Do i have to tell IIS where my pdt PHP project is or should Eclipse/PDT have done it?

I've been reading through the docs and testing out what i can.

I've installed PHP, Eclipse + PDT, IIS settings etc. - I'm reasonably sure they are all set and should work.

Now I create a PHP Project, add a newfile.php, basic code like :

<?php
echo "hello";

Now I right click the file,Run as -> Web Page and i get a 404.

Eclipse has tried to launch http://localhost:80/Php1/newfile.php

IIS has no virtual or physical directory so the request fails.

Should Eclipse/PDT have done this mapping? Or do I need to? or should I create my projects under c:\\inetpub\\wwwroot

Eclipse / PDT does not configure your webserver for you. It looks like it's assuming that your document root is your workspace, so you could put all your projects in your wwwroot if you wanted to. You don't need to use the Run As dialog though, as long as the files are somehow visible to IIS.

Personally I like to either make a vhost per project, or use symlinks to bring the project directories into the wwwroot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM