要获取当前页面的完整地址我们要经过很多操作如http或https,php文件与路径,主机域名,查询参数最后就成了。
获取协议-http:url的协议,可以读出在$ _server ['server_protocol']变量。
- */
- echo $_server['server_protocol'];
- /*
- 如果你检查值,可以发现,不只是http或https,但这样的字符串:http/1.1的
- */
- $protocol = strpos(strtolower($_server['server_protocol']),'https') === false ? 'http' : 'https';
- /*
- 获取主机域名*/
- $host = $_server['http_host'];
- /*
- 利用$ _server['script_name']获取除域名外的php文件与路径
- */
- $script = $_server['script_name'];
- //获取?后面查询参数
- $params = $_server['query_string'];
- //方法二
- $uri = $_server['request_uri'];
- //下面来看一个完整的获取当前url实例
- $protocol = strpos(strtolower($_server['server_protocol']),'https') === false ? 'http' : 'https';
- $host = $_server['http_host'];
- $script = $_server['script_name'];
- $params = $_server['query_string'];
- $currenturl = $protocol . '://' . $host . $script . '?' . $params;
- echo $currenturl;
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » php获取当前页面url地址及参数
波比源码 » php获取当前页面url地址及参数
order levaquin 500mg pills buy levaquin
imdur medication buy digoxin generic order telmisartan 20mg without prescription
order tadalafil 20mg sale cheap tadalafil sale buy amantadine generic
nootropil 800mg price buy piracetam 800 mg for sale viagra 50mg price
buy azithromycin 500mg pill buy neurontin 100mg for sale neurontin for sale online
lasix order generic furosemide plaquenil uk
buy viagra without prescription purchase viagra for sale buy lisinopril 5mg generic
cheap custom research papers research paper website purchase sildenafil pill
order clomiphene 50mg online order albuterol without prescription poker online real money
ozobax ca tizanidine drug order toradol 10mg generic
sumatriptan canada buy sumatriptan for sale avodart 0.5mg tablet
simvastatin 20mg over the counter proscar tablet finasteride online buy
buy essay now help with writing a paper ivermectin 18mg
sildenafil on line sildenafil overnight delivery order lamotrigine pills
oral prednisone buy prazosin 2mg online order vermox sale
fildena 100mg cost order rhinocort online rhinocort medication
pioglitazone order online purchase pioglitazone order viagra online
buy generic nifedipine 10mg adalat price buy allegra 120mg
cheap olmesartan 20mg calan 240mg cheap divalproex tablet
order diamox sale acetazolamide 250 mg us azathioprine 50mg pills
buy digoxin 250 mg buy molnunat 200mg oral molnupiravir
purchase carvedilol online oxybutynin us amitriptyline drug
amoxil 250mg ca buy stromectol for sale ivermectin 15 mg
generic priligy 90mg order motilium 10mg pill order domperidone 10mg online
order nortriptyline pill order panadol 500 mg sale buy paroxetine 20mg generic
pepcid 40mg tablet order mirtazapine 30mg pills mirtazapine price
ropinirole 2mg drug oral trandate trandate order
tadacip tablet tadalafil 10mg cost amoxicillin cheap
tricor 200mg uk sildenafil on line sildenafil 50mg us
buy nexium 20mg without prescription biaxin 250mg pill order furosemide 100mg
cialis pharmacy viagra 100mg for sale order viagra online cheap
tadalafil 10mg sale levitra discount buy erectile dysfunction medications
metformin 500mg oral order generic glycomet 1000mg tamoxifen 20mg oral
oral provigil 100mg buy modafinil pills promethazine 25mg pills
buy clomiphene 50mg generic prednisolone 10mg without prescription prednisolone 5mg without prescription
brand prednisone 20mg isotretinoin pills cheap amoxicillin pill
buy isotretinoin 40mg sale prednisone 5mg cost ampicillin 500mg generic
accutane 20mg pills isotretinoin cheap buy zithromax 250mg without prescription
albuterol online augmentin pills buy clavulanate without prescription
avodart order online dutasteride order online buy xenical 60mg online cheap
doxycycline 200mg pill order doxycycline 100mg sale zovirax 400mg price
order imuran 25mg online cheap naprosyn sale order naproxen 250mg pill