獲取當前路徑及其引數

2021-08-15 03:59:03 字數 583 閱讀 9096

php獲取

echo 'http://'.$_server['http_host'].$_server['request_uri'];

print_r($arr);

js獲取
window.location.host; //返回url 的主機部分,例如:www.***.com    

window.location.hostname; //返回www.***.com

window.location.pathname; //返回/a/index.php或者/index.php

window.location.protocol; //返回url 的協議部分,例如: http:,ftp:,maito:等等。

window.location.port //url 的埠部分,如果採用預設的80埠,那麼返回值並不是預設的80而是空字元

C C 獲取當前路徑

獲取當前工作目錄是使用函式 getcwd。cwd指的是 current working directory 這樣就好記憶了。函式說明 函式原型 char getcwd char buffer,int len 引數 buffer是指將當前工作目錄的絕對路徑copy到buffer所指的記憶體空間,len...

C C 獲取當前路徑

獲取當前工作目錄是使用函式 getcwd。cwd指的是 current working directory 這樣就好記憶了。函式說明 函式原型 char getcwd char buffer,int len 引數 buffer是指將當前工作目錄的絕對路徑copy到buffer所指的記憶體空間,len...

wince獲取當前路徑

在evc下沒有getcurrentdirectory 這個函式能方便地獲取當前工作路徑,所以我們只能通過getmodulefilename 函式的返回值來獲取當前的工作路徑.szpath 獲取的當前工作路徑 void getcurrentdirectory cstring szpath const ...