I have a Netbeans PHP project with code checked out from a subversion repository. The source files folder is outside my local web server document root. It has three sub-folders trunk, branches, and tags. The branches folder has a sub-folder 'my-branch' (say) which contains the code I am working on (a CodeIgniter project).
I have set the project properties to copy files from the sources folder to the web server document root (htdocs). This copies the trunk, branches and tags folders into the htdocs folder as I would expect.
However I really only want to copy the contents of the branches/my-branch folder to htdocs. I thought that setting the 'Web Root' property (on Project Properties | Sources) to 'branches/my-branch' might achieve this. However, this does not seem to work as I hoped it would.
Two questions:
I believe the best option here is to create a different Netbeans project for the trunk and each branch you want to work on.
The Web Root
setting tells Netbeans where the root of your application will be. Some applications have folders and files that won't be exposed on the webserver, but they are still part of the project (in your case think of the htdocs folder being a subfolder inside your project). This is just so Netbeans knows what URL to open if you right click a PHP file in Netbeans and choose Run
(Shift+F6)
Say you have these folders in your project:
myconfigfiles\
htdocs\
importantsecretdocuments\
If you set the Web Root
property to the htdocs
folder you'll notice that for any file inside the other two directories the 'Right click -> Run' option is greyed out.
Say your Project URL
is http://localhost
. Any file you right click inside the htdocs folder will open the page http://localhost/<selectedfile.php>/
. Without setting the Web Root
this would open http://localhost/htdocs/<selectedfile.php>