Eclipse webserver path mapping issue with PHP project

前端 未结 1 675
我在风中等你
我在风中等你 2021-01-22 11:51

I\'ve been reading through the other posts on this topic tried what was suggested in the post and still having the same issue.

I can run my php in an external browser bu

相关标签:
1条回答
  • 2021-01-22 12:39

    Add PHP2011X as an alias on your webserver, so the address generated by Eclipse does work.

    Another solution, but I think Eclipse is really inflexible here, is to define a mapping from the project file paths to project URL paths. But from what I know that is really inflexible and it didn't work most time for me.

    So I would go with configuring the webserver instead. If you're using apache, the directive is called Alias.

    Edit: You can try to place an Alias directive before the <Directory "C:/xampp/htdocs"> line:

    # Map Eclipse Project Name onto webroot (SO #6690405):
    Alias /PHP2011X "C:/xampp/htdocs"
    <Directory "C:/xampp/htdocs">
    

    Related: Setting up path mapping in PHP and Eclipse

    0 讨论(0)
提交回复
热议问题