c 中各種獲取路徑方法

2021-10-02 04:08:57 字數 281 閱讀 6787

// 獲取模組的完整路徑,包含檔名

system.diagnostics.process.getcurrentprocess().mainmodule.filename

// 獲取和設定當前目錄(該程序從中啟動的目錄)的完全限定目錄。

system.environment.currentdirectory

// 獲取應用程式的當前工作目錄,注意工作目錄是可以改變的,而不限定在程式所在目錄。

system.io.directory.getcurrentdirectory()

c 中獲取路徑方法

要在c 中獲取路徑有好多方法,一般常用的有以下五種 獲取應用程式的當前工作目錄。string path1 system.io.directory.getcurrentdirectory messagebox.show 獲取應用程式的當前工作目錄 path1 獲取程式的基目錄。string path2...

laravel各種路徑的獲取方法

若route中有route get home test homecontroller index name test 檢視中的href跳轉 一 區別 最方便,但路由改變時就又要修改了 二 區別 可直接命名使用,不因uri改變而改變,我喜歡用 注 用route需要在route中 name 三 區別 直...

laravel各種路徑的獲取方法

若route中有route get home test homecontroller index name test 檢視中的href跳轉 一 區別 最方便,但路由改變時就又要修改了 二 區別 可直接命名使用,不因uri改變而改變,我喜歡用 注 用route需要在route中 name 三 四 控制...