php学习笔记 预定义数组(超全局数组),需要的朋友可以参考下。
- /* 预定义数组:
- * 自动全局变量—超全局数组
- *
- * 1.包含了来自WEB服务器,客户端,运行环境和用户输入的数据
- * 2.这些数组比较特别
- * 3.全局范围内自动生效,都可以直接使用这些数组
- * 4.用户不能自定义这些数组,但这些数组的操作方式和自己定义的数组操作的方式一样
- * 5.在函数中直接可以使用这些数组
- *
- * $_GET //经由URL请求提交至脚本的变量
- * $_POST //经由HTTP POST 方法提交到脚本的变量
- * $_REQUEST //经由GET , POST和COOKIE机制提交 到脚本的变量
- * $_FILES //经由http post方法文件上传而提交至脚本的变量
- * $_COOKIE
- * $_SESSION
- * $_ENV //执行环境提交至脚本的变量
- * $_SERVER //变量由WEB服务器设定的,或直接和当前脚本的执行环境相关联
- * $GLOBALS //只要是当前脚本有效的变量都在这里,数组的键名为全局脚本的名称
- *
- *
- */
- //超全局数组在函数内部可以直接调用
- $arr=array(10,20);//一般数组
- $_GET=array(50,90);//超全局数组
- function demo(){
- global $arr;//调用全局变量要先包含
- print_r($arr);
- print_r($_GET);//直接调用超全局数组不用包含
- }
- ?>
- //直接把传的值当变量用,当php.ini配置文件中register_global=on时有用。
- echo $username."
"; - echo $email."
"; - echo $page."
"; - //最稳定的取值方法
- echo $_GET["username"]."
"; - echo $_GET["email"]."
"; - echo $_GET["page"]."
"; - ?>
- "demo.php?username=zhangsan&email=aaa@bbb.com&page=45">this is a $_GET test
- <form action="demo.php" method="post"> </form action=
- username:<input type=<form action="text" name="uname" />
</form action=</input type= - password:<input type=<input type=<form action="password" name="pass" />
</form action=</input type=</input type= - <input type=<input type=<input type=<form action="submit" value="login" />
</form action=</input type=</input type=</input type= - print_r($_GET);//不能接收到
- print_r($_POST);//这样才能接收到
- ?>
- //$_ENV的使用
- echo'
';
- print_r($_ENV);
- echo'
- ';
- //显示当前环境
- // 也可以单个遍历
- ?>
- //利用$GLOBALS超全局数组在函数内部调用全局变量
- $a=100;
- $b=200;
- $c=300;
- function demo()
- {
- //直接调用全局变量
- echo $GLOBALS["a"]."
"; - echo $GLOABLS["b"]."
"; - echo $GLOABLS["c"]."
"; - }
- ?>
- print_r($_ENV);
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » php学习笔记 [预定义数组(超全局数组)]
波比源码 » php学习笔记 [预定义数组(超全局数组)]
levaquin 500mg without prescription buy levaquin 500mg pill
buy dutasteride without prescription dutasteride oral buy zofran 4mg
order spironolactone online cheap buy fluconazole 200mg generic fluconazole sale
ampicillin 500mg ca cost cephalexin erythromycin pills
buy sildenafil 50mg pill purchase bimatoprost online order robaxin 500mg
sildenafil pills buy suhagra 50mg pills order estradiol
lamictal 50mg price order retin sale order retin generic
tadalis 20mg uk purchase tadalis pill buy diclofenac 50mg without prescription
buy isotretinoin generic buy accutane 40mg sale azithromycin brand
arimidex 1 mg sale cheapest prices on generic viagra brand viagra
tadalafil 10mg en ligne viagra prix sildenafil 25mg sans ordonnance
deltasone 10mg brand cialis discount internet buy viagra 50mg for sale
tadalafil 20mg bestellen viagra 200mg kaufen ohne rezept viagra 50mg kaufen
accutane 20mg pill generic amoxicillin 1000mg buy ivermectin uk
order modafinil 100mg generic Buy cheap cialis acetazolamide over the counter
order doxycycline 200mg online order doxycycline pills furosemide 40mg without prescription
ramipril canada clobetasol cheap azelastine sprayers
clonidine 0.1mg cheap minocin 100mg canada order spiriva without prescription
order olmesartan 20mg generic order calan sale buy diamox 250 mg sale
tacrolimus cost oral ropinirole 1mg ursodiol 300mg usa
buy imdur 40mg digoxin 2250 mg price order telmisartan 20mg for sale
bupropion pill cetirizine 5mg generic cheap seroquel 100mg
order zoloft 100mg for sale sertraline price genuine viagra
buy salbutamol 100 mcg for sale buy pantoprazole generic sildenafil 100mg us
purchasing cialis on the internet Approved cialis sildenafil 100mg over the counter
order cialis online cheap amantadine 100 mg uk purchase symmetrel without prescription
naltrexone 50mg cost order abilify order abilify 20mg for sale
medroxyprogesterone canada praziquantel 600 mg brand cyproheptadine for sale
provigil sale oral provigil 100mg buy stromectol
buy luvox 50mg generic buy generic glipizide 10mg purchase glucotrol online cheap
isotretinoin 40mg oral prednisone online buy generic prednisone 5mg
tadalafil 40mg pill order tadalafil 20mg online cheap cheap sildenafil pill
chloroquine for sale olumiant 4mg ca purchase olumiant online cheap
itraconazole oral order itraconazole online cheap buy tindamax 500mg for sale
buy generic zyprexa 10mg valsartan 160mg over the counter buy generic diovan
norvasc 5mg usa norvasc 5mg oral tadalafil 5mg uk
clozaril over the counter combivent 100mcg us buy decadron 0,0,5 mg online
pfizer viagra 50mg buy lisinopril 10mg pill buy lisinopril without prescription
generic prilosec 10mg blackjack online black jack
order lopressor without prescription buy levitra 10mg pills order levitra for sale
pre written essays for sale academic writing support casino games free
order levitra 20mg online medrol order medrol 8mg oral
essay helpers purchase viagra pills us viagra
purchase clomiphene without prescription buy generic clomiphene 50mg free roulette online
tadalafil medication order tadalafil 5mg without prescription buy sildenafil 100mg for sale
triamcinolone 10mg brand claritin price order clarinex without prescription
priligy 30mg pill order generic synthroid 75mcg order synthroid 75mcg
buy cialis 20mg purchasing viagra on the internet order sildenafil 50mg pill
tadalafil canada buy inderal 20mg online order plavix generic
buy methotrexate 10mg without prescription buy warfarin 5mg online cheap order metoclopramide 20mg generic
losartan 25mg brand buy topiramate pill topamax 200mg usa
ozobax over the counter ozobax buy online toradol 10mg oral
imitrex 50mg tablet buy levaquin 250mg for sale order avodart online cheap
buy colchicine 0.5mg sale colchicine for sale online casino real money us
ranitidine usa zantac 150mg canada order celecoxib 100mg for sale
casino online slots black jack card game free blackjack online real money
buy flomax 0.2mg pills flomax online buy purchase aldactone generic
simvastatin 20mg brand buy simvastatin 10mg without prescription finasteride 5mg brand
flagyl 200mg for sale buy bactrim 960mg pills cheap sulfamethoxazole
cephalexin 250mg canada order cleocin 300mg pill erythromycin pill
tadalafil 10mg ca cost tadalafil purchase viagra for sale
viagra 200mg purchase viagra sale oral cialis
cefuroxime cost buy methocarbamol without prescription buy robaxin generic
planning poker online online gambling real money order tadalafil 40mg for sale
trazodone price order generic sildenafil aurogra pills
sildenafil pill sildalis generic lamictal 200mg generic
prednisone 5mg cheap buy deltasone pills amoxicillin for sale
online blackjack real money blackjack vegas free online games modafinil pills
order sildenafil 100mg pill order budesonide sale purchase rhinocort pill
prednisone 10mg sale prednisone 10mg uk mebendazole pills
buy tretinoin gel retin order online order avana for sale
terbinafine without prescription order lamisil 250mg pill purchase trimox pills
order spiriva 9mcg pills purchase terazosin buy terazosin for sale
order proventil brand cipro buy ciprofloxacin 1000mg pills
order actos 15mg for sale viagra cost viagra without prescription
discount cialis erection pills that work oral tadalafil 10mg
online blackjack with friends big fish casino online blackjack games
generic ivermectin for humans order generic amantadine purchase avlosulfon
essay helper online arava 20mg drug buy sulfasalazine 500mg pills
asacol 800mg sale buy irbesartan 300mg without prescription irbesartan 150mg over the counter
buy acetazolamide without prescription generic isosorbide azathioprine without prescription
purchase digoxin order micardis 80mg sale molnupiravir 200 mg cheap
carvedilol 6.25mg cheap buy elavil generic order generic amitriptyline 10mg
buy amoxil sale amoxil 500mg drug stromectol for humans
purchase alendronate generic purchase furadantin online cheap buy ibuprofen 600mg pill
order priligy 90mg pill oral motilium 10mg order domperidone pills
pamelor 25mg cheap buy panadol generic order paroxetine 20mg online
order indocin 50mg capsule buy cenforce pill cenforce 100mg tablet
order doxycycline 100mg generic cost aralen methylprednisolone 16 mg online
requip pills order calcitriol pills buy labetalol pill
canadian pharmacy advair
order minocycline generic order gabapentin 100mg pills order terazosin 1mg pill
order metformin 500mg pills calan 120mg ca buy tamoxifen 20mg for sale
purchase modafinil for sale cost stromectol 6mg order phenergan without prescription
clomid 100mg pill buy prednisolone 10mg sale prednisolone 5mg drug
generic deltasone prednisone 40mg over the counter buy amoxicillin 250mg generic
accutane 10mg pills purchase isotretinoin pills buy acillin generic
generic zofran 4mg sulfamethoxazole tablet buy sulfamethoxazole for sale
accutane 40mg uk amoxicillin without prescription zithromax brand
order albuterol 2mg generic buy augmentin 375mg order augmentin 625mg pills
buy modafinil 100mg for sale buy metoprolol pill buy generic lopressor
order prednisolone online buy lasix 100mg buy lasix online cheap
паспорт ес румыния
order dutasteride online xenical us generic xenical 120mg
buy doxycycline 100mg pills buy zovirax generic acyclovir 400mg generic
buy azathioprine 50mg purchase imuran pills naproxen us