tempnam() 函数创建一个具有唯一文件名的临时文件,若成功,则该函数返回新的临时文件名,若失败,则返回false。
语法:tempnam(dir,prefix)
- function dir_wriable($dir) //自定义函数扩展建立临时文件
- {
- $test=tempnam("$dir","test_file"); //建立临时文件
- if($fp=@fopen($test,"w")) //如果文件成功打开
- {
- @fclose($fp); //关闭文件
- @unlink($test); //删除文件
- $wriable="ture"; //返回值为真
- }
- else
- {
- $wriable=false or die("cannot open $test!"); //返回值为假
- }
- return $wriable; //返回布尔型值
- }
- if(dir_wriable(str_replace('//','/',dirname(__file__)))) //调用自定义函数
- {
- $dir_wriable='建立文件成功';
- }
- else
- {
- $dir_wriable='建立文件失败';
- }
如果php不能在指定的 dir 参数中创建文件,则退回到系统默认值。
注释:本函数的行为在 4.0.3 版中改变了。也会建立一个临时文件以避免竞争情形,即有可能会在产生出作为文件名的字符串与脚本真正建立该文件之间会在文件系统中存在同名文件。注意,如果不再需要该文件则要删除此文件,不会自动删除的。
tmpfile() 函数以读写(w+)模式建立一个具有唯一文件名的临时文件,文件会在关闭后用 fclose()自动被删除,或当脚本结束后。
- $temp = tmpfile();
- fwrite($temp, "testing, testing.");
- //倒回文件的开头
- rewind($temp);
- //从文件中读取 1k
- echo fread($temp,1024);
- //删除文件
- fclose($temp);
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » php创建临时文件tempnam与tmpfile区别
波比源码 » php创建临时文件tempnam与tmpfile区别
levaquin ca buy levaquin 250mg generic
order dutasteride without prescription purchase avodart zofran 4mg sale
buy aldactone 25mg pills valtrex 500mg usa buy diflucan without prescription
acillin ca erythromycin pills erythromycin uk
buy sildenafil for sale sildenafil 50mg cost buy robaxin 500mg online cheap
sildenafil 50mg generic sildenafil on line estrace 1mg tablet
lamotrigine 50mg over the counter purchase tretinoin generic retin cream brand
order tadalis online buy tadalis 20mg online cheap order generic diclofenac
tadalafil 20mg generic ed treatment drugs purchase sildenafil pill
purchase anastrozole Overnight viagra generic sildenafil 100mg
cialis comprimГ© viagra 25mg generique pharmacie en ligne sildenafil 200mg
buy generic prednisone 20mg generic cialis tadalafil 20mg sildenafil 50mg for sale
oral doxycycline order levitra buy furosemide 40mg sale
altace 10mg canada cheap altace 5mg buy azelastine 10ml
buy catapres 0.1 mg online minocycline 100mg usa tiotropium bromide 9 mcg over the counter
order buspirone 5mg oxybutynin 2.5mg ca purchase oxybutynin pills
terazosin 5mg without prescription hytrin 5mg pills sulfasalazine 500mg ca
fosamax generic buy motrin 600mg pills purchase famotidine
olmesartan 20mg us verapamil pill order diamox 250mg online
prograf tablet buy prograf sale buy urso 300mg
imdur over the counter lanoxin 250 mg without prescription buy micardis 20mg generic
purchase molnunat molnunat tablet prevacid online order
sertraline 100mg canada purchase sildenafil sildenafil for sale
cialis 5mg canada cialis over the counter amantadine 100mg brand
modafinil over the counter provigil generic ivermectin medication
purchase luvox pills duloxetine 40mg drug glucotrol 5mg for sale
purchase accutane for sale deltasone for sale online prednisone price
piracetam 800 mg sale sildenafil canada sildenafil overnight shipping
zithromax order prednisolone 10mg usa order gabapentin 100mg pills
cialis from canada pfizer viagra sildenafil pills 200mg
furosemide 100mg canada buy furosemide 100mg generic plaquenil tablet
order cialis 10mg for sale tadalafil 20mg tablet anafranil 25mg pill
chloroquine 250mg sale purchase chloroquine without prescription olumiant generic
buy sporanox online buy progesterone sale tindamax 500mg pill
order zyprexa 10mg generic order bystolic generic order valsartan 160mg pills
buy generic amlodipine 10mg order sildenafil 100mg online cheap tadalafil 40mg drug
omeprazole pills online blackjack with real money online poker free
zyvox 600mg canada free spins no deposit us play slots online
metoprolol us purchase vardenafil sale purchase levitra for sale
essays for sale online best casinos real online casino
order levitra 20mg order levitra pills generic methylprednisolone online
write essays online writing paper online sildenafil order
clomid 50mg for sale online casino games for real money roulette wheel online
order tadalafil 5mg pill us cialis cheap sildenafil
order priligy 30mg pill misoprostol 200mcg canada synthroid 75mcg canada
xenical 60mg for sale diltiazem generic zovirax usa
buy cialis 5mg pill inderal 10mg sale plavix 150mg brand
buy zyloprim online cheap ezetimibe 10mg usa zetia ca
methotrexate 2.5mg for sale brand methotrexate 10mg metoclopramide uk
order losartan 25mg online buy nexium 40mg without prescription topiramate 100mg us
ozobax generic oral baclofen cost toradol 10mg
imitrex online buy avodart 0.5mg sale buy avodart sale
colchicine 0.5mg pill blackjack online free casino games online
parx casino online slots casino online poker sites
tamsulosin 0.2mg generic order aldactone sale buy spironolactone 100mg pills
tadalafil 5mg uk cialis 10mg pill ciprofloxacin 500mg ca
zocor 20mg ca buy finasteride 1mg without prescription order propecia 5mg without prescription
order fluconazole sale sildenafil pharmacy purchase sildenafil
generic cephalexin 250mg order erythromycin 250mg sale order erythromycin online cheap
cialis 20mg ca cialis 10mg usa viagra oral
buy viagra 50mg for sale cheap cialis pills tadalafil 40mg brand
ceftin 250mg sale buy robaxin 500mg without prescription buy robaxin for sale
sildalis online buy lamotrigine 200mg without prescription order lamotrigine sale
purchase sildenafil online cheap cialis otc brand name cialis
deltasone 40mg ca order prednisone 20mg without prescription buy generic mebendazole
order retin online cheap buy avana sale order avanafil 200mg pills
purchase naprosyn sale buy naprosyn 250mg online prevacid medication
buy tiotropium bromide 9mcg for sale brand spiriva 9mcg terazosin 1mg cost
order albuterol 100mcg online cheap buy ciprofloxacin 500mg pill cipro 1000mg drug
order tadalafil generic vegas casino online casinos online
parx casino online online casino with free signup bonus real money usa free spins no deposit canada
ivermectin 1% cream generic dapsone 100 mg for sale dapsone usa
casino money legal canadian prescription drugs online help with writing a paper
buying an essay write my cover letter for me order sulfasalazine sale
buy ramipril 10mg for sale oral arcoxia 60mg purchase etoricoxib pills
doxycycline 100mg oral cleocin 150mg without prescription oral cleocin 150mg
buy generic asacol 800mg astelin 10 ml over the counter order irbesartan 150mg sale
purchase clobetasol online cheap buy buspar order amiodarone 200mg sale
priligy pills buy motilium sale domperidone tablet
requip 2mg for sale order labetalol 100 mg generic labetalol 100mg
nexium 20mg without prescription order biaxin sale order lasix 40mg without prescription
accutane drug isotretinoin tablet buy zithromax 500mg pill
brand inderal 20mg buy carvedilol 25mg generic carvedilol pills
buy omnicef for sale lansoprazole over the counter buy pantoprazole 40mg online
order simvastatin 20mg generic order sildalis online buy sildalis pills
alfuzosin 10 mg canada uroxatral medication order diltiazem 180mg generic