2014-02-19 17 views
3

我試圖創建一個新的PHP項目在這種情況下,我們的客戶只給我們遠程桌面連接到他們的文件。如何在Netbeans中創建一個包含位於本地網絡中的源文件的新PHP項目?

它是如何在Netbeans的平時工作:

說得簡單,當一個項目是,我們可以在我們的項目中點擊單個文件並上傳和下載(通過FTP)外部資源創建的。

nb options to upload and download via ftp

我希望能夠做到這一點也位於這可以通過我們的本地網絡達成,但尚未安裝FTP服務器遠程文件。

額外的細節

到現在爲止,我們已經能夠在此設置通過使用Dreamweaver,它允許在服務器選項設置位於本地網絡中的地址正常工作。

我真的想切換到Netbeans和能夠點擊上傳和下載的本地文件與它們的服務器同步,但我不能找到一種方法來實現這一目標。

創建一個允許這種設置的新項目似乎沒有選項。選擇遠程網站似乎只允許ftp同步。

List of projects types

在另一方面,如果我選擇「本地網站」我可以選擇本地網絡中的文件,但NB不允許我做他們的本地副本。

note 1:我們訪問的服務器沒有安裝ftp。

note 2:「將文件從源文件夾複製到另一個位置」對我來說不是一個真正的選擇,因爲我想將我的本地副本與服務器上的內容分開(並且我認爲此設置只會複製這些文件而不給我任何控制權)。

note 3:使用現有源創建項目似乎只允許通過ftp訪問遠程文件。

回答

2

這將是有一些版本系統有用(GIT, mercurial,svn ...)。你可以在Windows中安裝網絡驅動器嗎? (見here)。這至少可以讓你輕鬆地從現有源創建項目(儘管通過網絡工作可能會很慢)

我能想到的一個哈克的方式是:

  • 安裝網絡驅動器如上所述並將其映射到了一些來信,說ž
  • 安裝本地FTP服務器(例如FileZilla中)
  • 配置的FileZilla FTP服務器使用的網絡驅動器作爲「ftp主」(它的FileZilla將用於保存發送的文件的文件夾又名FTP) - 只需使用Z:\路徑指向映射到字母Z的安裝的網絡驅動器
  • 在NetBeans中,創建一個從遠程服務器的新的PHP項目(其中遠程服務器是您的本地FileZilla的服務器)

從理論上講,這應該工作。

+0

感謝您的回答。我已經嘗試過這種方式,現在我正在重做。問題是,我每次嘗試設置一個本地ftp連接到已安裝的驅動器時,它只顯示一個空文件夾,當我連接到它(我有本地網絡文件夾映射爲W :.我找不到顯示方式它的內容通過ftp。相反,如果我訪問C:我可以正常看到內容..)你有什麼想法可能是什麼問題? – nowhere

+0

沒關係,我沒有發現這個:https://forum.filezilla-project.org/viewtopic.php?f=6&t=5154;) – nowhere

+0

似乎沒有辦法通過FTP訪問本地網絡源,甚至沒有filezilla 。每次我嘗試連接到一個空文件夾。 – nowhere

1

這裏是NetBeans site片段:

要爲現有的Web應用程序NetBeans項目:

Choose File > New Project (Ctrl-Shift-N on Windows/Cmd-Shift-N on OS X). 
Choose Java Web > Web Application with Existing Sources. Click Next. 
In the Name and Location page of the wizard, follow these steps: 
    In the Location field, enter the folder that contains the web application's source root folders and web page folders. 
    Type a project name. 
    (Optional) Change the location of the project folder. 
(Optional) Select the Use Dedicated Folder for Storing Libraries checkbox and specify the location for the libraries folder. See Sharing Project Libraries in NetBeans IDE for more information on this option. 
(Optional) Select the Set as Main Project checkbox. When you select this option, keyboard shortcuts for commands such as Clean and Build Main Project (Shift-F11) apply to this project. 
Click Next to advance to the Server and Settings page of the wizard. 
(Optional) Add the project to an existing enterprise application. 
Select a server to which to deploy. If the server that you want does not appear, click Add to register the server in the IDE. 
Set the source level to the Java version on which you want the application to run. 
(Optional) Adjust the context path. By default, the context path is based on the project name. 
Click Next to advance to the Existing Sources and Libraries page of the wizard. 
Verify all of the fields on the page, such as the values for the Web Pages Folder and Source Package Folders. 
Click Finish. 
+0

對不起,但我想安裝一個PHP項目。另外還可以選擇使用現有的源代碼,但我希望在本地副本上工作,然後通過單擊上載/下載單個文件(而不是直接在「生產」目錄中工作)來同步它。 – nowhere

相關問題