程式中,路徑上一層可以用 ../ 表示。
\ 則表示根目錄。
~/ 則是虛擬的根目錄。
例如:
網址為:http://localhost:2564/newWeb/test.aspx
../ 為 http://localhost:2564/newWeb
\ 為 http://localhost:2564
~/ 為 http://localhost:2564/newWeb
網址為:http://localhost:2564/newWeb/
../ 為 http://localhost:2564
\ 為 http://localhost:2564
~/ 為 http://localhost:2564/newWeb
網址為:http://123.123.15.165
../ 為 Error
\ 為 http://123.123.15.165
~/ 為 http://123.123.15.165
網址為:http://123.123.15.165/test.aspx
../ 為 http://123.123.15.165
\ 為 http://123.123.15.165
~/ 為 http://123.123.15.165
\ 則表示根目錄。
~/ 則是虛擬的根目錄。
例如:
網址為:http://localhost:2564/newWeb/test.aspx
../ 為 http://localhost:2564/newWeb
\ 為 http://localhost:2564
~/ 為 http://localhost:2564/newWeb
網址為:http://localhost:2564/newWeb/
../ 為 http://localhost:2564
\ 為 http://localhost:2564
~/ 為 http://localhost:2564/newWeb
網址為:http://123.123.15.165
../ 為 Error
\ 為 http://123.123.15.165
~/ 為 http://123.123.15.165
網址為:http://123.123.15.165/test.aspx
../ 為 http://123.123.15.165
\ 為 http://123.123.15.165
~/ 為 http://123.123.15.165