简体   繁体   English

加载正确的索引文件

[英]Loading Correct Index File

I'm trying to figure out how to tell Netbeans to load the index file that is inside of my public_html folder when the project is ran and I'm not sure how to. 我正试图弄清楚如何告诉Netbeans在项目运行时加载我的public_html文件夹中的索引文件,我不知道如何。

Sources : http://screencast.com/t/kWMCRKOWoo 资料来源: http//screencast.com/t/kWMCRKOWoo

在此输入图像描述

Run Configuration : http://screencast.com/t/SqZTN7Pu 运行配置: http//screencast.com/t/SqZTN7Pu

在此输入图像描述

EDIT : 编辑:

Can anybody expand on the answer below? 任何人都可以扩展下面的答案吗? Any additional ideas with seeing my two screenshots. 看到我的两个截图时的任何其他想法。

  1. Rightclick on the project in the project explorer. 右键单击项目资源管理器中的项目。
  2. Click Properties . 单击Properties
  3. Select Run Configurations under categories section. 选择Run Configurations类别Run Configurations下的Run Configurations ”部分
  4. Update the Project url & Index file fields. 更新Project urlIndex file字段。
  5. Done ! 做完了! :) :)

Update Project folder & Source folder too under sources category if those are incorrect. 如果这些文件不正确,也会在源类别下更新Project folderSource folder

You can via localhost only run files inside 你可以通过localhost只在里面运行文件

 http://localhost/WrestlingManager/index.php

and that is mapped to 并且映射到

 C:\xampp\htdocs\WrestlingManager\index.php

and that's what you have set in your run configuration. 这就是你在运行配置中设置的内容。

It's easy if you can run in a browser (for example). 如果您可以在浏览器中运行(例如),这很容易。

 http://localhost/WrestlingManager/public_html/index.php

If you want to run files from another location . 如果要从其他位置运行文件。 You must that folder have in your server conf file 您必须在server conf file包含该文件夹

Alias /public_html = "C:/Netbeans/Projects/PhpApp1/public_html"

from my Apache httpd.conf 来自我的Apache httpd.conf

Alias /samples "D:/mysamples/xysamples"
<Directory "D:/mysamples/xysamples">
   Options Indexes FollowSymLinks MultiViews ExecCGI
   Order allow,deny
    Allow from all
</Directory>

Now I can : http:/localhost/samples 现在我可以: http:/localhost/samples

I can not see the real path of the public_html folder inside of your Netbeans project . 我无法在Netbeans项目中看到public_html文件夹的真实路径。

In Run configuration you can set 在运行配置中,您可以设置

  • Project URL : http://localhost/WrestlingManager/public_html/ 项目URL: http://localhost/WrestlingManager/public_html/
  • Index File : index.php 索引文件:index.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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