PHP NetBeans startup configuration: how can I omit the doc root folder?

So, I have this PHP project where I have some include files next to the wwwroot (or doc-root) folder, and not under the wwwroot folder. However, I need to run / debug this project. in the project properties, I can select the index file (index.php), but it is in the folder with the doc root, so the project URL does http: //myprojectmachine/doc-root/index.php instead of ..: // myprojectmachine / index.php. Manually entering the index file does not work because NetBeans states that the file was not found. How can I overcome this in an elegant way?

+4
source share
2 answers

I had the same issue yesterday. You can select the correct document root by right-clicking on your project, selecting Properties and clicking the Browse button next to Web Root in the Sources panel.

+5
source

you can set the project url when creating the project, which is the best time for this if you think about it. This is the bottom parameter on the page where you select the directory for the code.

Although, since you have already created it, you can easily change it in the project properties. I am not 100% sure if this will work if you do this on your local machine; the only web projects that I open right now, I work through SFTP in NetBeans, but changing the settings to the local web server, it shows the same option:

  • In the Projects panel, right-click the project and select Properties
  • Go to Run Configuration on the left side of the window
  • As a third option, you should see the Project URL , here you set what you want as the root URL for the project. So you just have http://myprojectmachine/
0
source

Source: https://habr.com/ru/post/1305219/


All Articles