doujing5150 2015-08-20 13:48
浏览 97
已采纳

运行PHP文件时,netbeans 8不引用实际的PHP文件路径

I have installed php, mysql and nginx properly.

I am able to run the PHP pages from Eclipse, i.e Eclipse opens up chrome, and pages are displayed correctly.

I imported my existing PHP project into Netbeans.

When I try to run any of the php pages, netbeans opens up chrome, but the web address is always the same, and not the real path of the PHP file.

Why netbeans refers to the same location, instead of trying to run the file from its real path? how can I fix it?

Thanks,

Qwerty

  • 写回答

1条回答 默认 最新

  • dp518158 2015-08-28 15:24
    关注

    I found the solution.

    The green "play" button in Netbeans does not run the current file, but runs the PROJECT! This caused eclipse to run the project path instead of the current file location!

    Therefore, in order to run the current file click on "Run -> Run File" (Shift +F6), and then it works.

    Just make sure that the project path is set properly in "Run->Set Project Configuration -> Customize", and then set the project URL to:

    http://localhost/

    That`s it!

    Thanks,

    Qwerty

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 VB.NET2022如何生成发布成exe文件
  • ¥30 matlab appdesigner私有函数嵌套整合
  • ¥15 给我一个openharmony跑通webrtc实现视频会议的简单demo项目,sdk为12
  • ¥15 vb6.0使用jmail接收smtp邮件并另存附件到D盘
  • ¥30 vb net 使用 sendMessage 如何输入鼠标坐标
  • ¥15 关于freesurfer使用freeview可视化的问题
  • ¥100 谁能在荣耀自带系统MagicOS版本下,隐藏手机桌面图标?
  • ¥15 求SC-LIWC词典!
  • ¥20 有关esp8266连接阿里云
  • ¥15 C# 调用Bartender打印机打印