﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-流云止水布拉阁</title><link>http://www.cnblogs.com/amgod/</link><description>这里有我在网络中走过的大部分足迹！</description><language>zh-cn</language><lastBuildDate>Thu, 18 Mar 2010 16:01:05 GMT</lastBuildDate><pubDate>Thu, 18 Mar 2010 16:01:05 GMT</pubDate><ttl>60</ttl><item><title>佛经上讲的181条做人的道理</title><link>http://www.cnblogs.com/amgod/archive/2007/09/06/883747.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Wed, 05 Sep 2007 19:01:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2007/09/06/883747.html</guid><description><![CDATA[<p>阅读: 144 评论: 1 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2007-09-06 03:01 <a href="http://www.cnblogs.com/amgod/archive/2007/09/06/883747.html" target="_blank">原文链接</a></p><img height="240" alt="" src="http://www.cnblogs.com/images/cnblogs_com/amgod/x1pxOYwqu4SjF6g-I67IlB8jMxK80VnC88YsgPLathbftS140s6qMACmVaZsY_TWSi72f4H51ova0hXUbzUqzV4tZeSyw-Hd6g0uEBIIf2dmTvZy-2vD5edVGJ2Y5xcbcn_qc5UVVGTRlb92KgM5o189g.gif" width="179" border="0" /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一、人之所以痛苦，在于追求错误的东西。 <br />
　　二、与其说是别人让你痛苦，不如说自己的修养不够。 <br />
　　三、如果你不给自己烦恼，别人也永远不可能给你烦恼。因为你自己的内心，你放不下。&nbsp; <br />
　　四、好好的管教你自己，不要管别人。 <br />
　　五、不宽恕众生，不原谅众生，是苦了你自己。 <br />
　　六、别说别人可怜，自己更可怜，自己修行又如何？自己又懂得人生多少？ <br />
　　七、学佛是对自己的良心交待，不是做给别人看的。 <br />
　　八、福报不够的人，就会常常听到是非；福报够的人，从来就没听到过是非。 <br />
　　九、修行是点滴的工夫。 <br />
　　十、在顺境中修行，永远不能成佛。 <br />
　　十一、你永远要感谢给你逆境的众生。 <br />
　　十二、你随时要认命，因为你是人。 <br />
　　十三、你永远要宽恕众生，不论他有多坏，甚至他伤害过你，你一定要放下，才能得到真正的快乐。 <br />
　　十四、这个世界本来就是痛苦的，没有例外的。 <br />
　　十五、当你快乐时，你要想，这快乐不是永恒的。当你痛苦时你要想这痛苦也不是永愕摹?<br />
　　十六、认识自己，降伏自己，改变自己，才能改变别人。 <br />
　　十七、今日的执著，会造成明日的后悔。 <br />
　　十八、你可以拥有爱，但不要执著，因为分离是必然的。 <br />
　　十九、不要浪费你的生命在你一定会后悔的地方上。 <br />
　　二十、你什么时候放下，什么时候就没有烦恼。 <br />
　　二一、内心没有分别心，就是真正的苦行。 <br />
　　二二、学佛第一个观念，永远不去看众生的过错。你看众生的过错，你永远污染你自己，你根本不可能修行。 <br />
　　二三、你每天若看见众生的过失和是非，你就要赶快去忏悔，这就是修行二四、业障深重的人，一天到晚都在看别人的过失与缺点，真正修行的人，从不会去看别人的过失与缺点。 <br />
　　二五、每一种创伤，都是一种成熟。 <br />
　　二六、当你知道迷惑时，并不可怜， 当你不知道迷惑时，才是最可怜的。 <br />
　　二七、狂妄的人有救，自卑的人没有救。 <br />
　　二八、你不要一直不满人家，你应该一直检讨自己才对。不满人家，是苦了你自己。 <br />
　　二九、一切恶法，本是虚妄的，你不要太自卑你自己。一切善法，也是虚妄的，你也不要太狂妄你自己。 <br />
　　三十、当你烦恼的时候，你就要告诉你自己，这一切都是假的，你烦恼什么？ <br />
　　三一、当你未学佛的时候，你看什么都不顺。当你学佛以后，你要看什么都很顺。 <br />
　　三二、你要包容那些意见跟你不同的人，这样子日子比较好过。你要是一直想改变他，那样子你会很痛苦。要学学怎样忍受他才是。你要学学怎样包容他才是。 <br />
　　三三、承认自己的伟大，就是认同自己的愚疑。 <br />
　　三四、修行就是修正自己错误的观念。 <br />
　　三五、医生难医命终之人，佛陀难渡无缘的众生。 <br />
　　三六、一个人如果不能从内心去原谅别人，那他就永远不会心安理得。 <br />
　　三七、心中装满着自己的看法与想法的人，永远听不见别人的心声。 <br />
　　三八、毁灭人只要一句话，培植一个人却要千句话，请你多口下留情。 <br />
　　三九、当你劝告别人时，若不顾及别人的自尊心，那么再好的言语都没有用的。 <br />
　　四十、不要在你的智慧中夹杂着傲慢。不要使你的谦虚心缺乏智慧。 <br />
　　四一、根本不必回头去看咒骂你的人是谁？如果有一条疯狗咬你一口，难道你也要趴下去反咬他一口吗？ <br />
　　四二、忌妒别人，不会给自己增加任何的好处。忌妒别人，也不可能减少别人的成就。 <br />
　　四三、永远不要浪费你的一分一秒，去想任何你不喜欢的人。 <br />
　　四四、多少人要离开这个世间时，都会说出同一句话，这世界真是无奈与凄凉啊！ <br />
　　四五、恋爱不是慈善事业，不能随便施舍的。感情是没有公式，没有原则，没有道理可循的。可是人们至死都还在执著与追求。 <br />
　　四六、请你用慈悲心和温和的态度，把你的不满与委屈说出来，别人就容易接受。 <br />
　　四七、创造机会的人是勇者。等待机会的人是愚者。 <br />
　　四八、能说不能行，不是真智慧。 <br />
　　四九、多用心去倾听别人怎么说，不要急着表达你自己的看法。 <br />
　　五十、同样的瓶子，你为什么要装毒药呢？同样的心理，你为什么要充满着烦恼呢？ <br />
　　五一、得不到的东西，我们会一直以为他是美好的，那是因为你对他了解太少，没有时间与他相处在一起。当有一天，你深入了解后，你会发现原不是你想像中的那么美好。 <br />
　　五二、这个世间只有爱猫扑.爱生活的。 <br />
　　五三、修行要有耐性，要能甘于淡泊，乐于寂寞。 <br />
　　五四、活着一天，就是有福气，就该珍惜。当我哭泣我没有鞋子穿的时候，我发现有人却没有脚。 <br />
　　五五、多一分心力去注意别人，就少一分心力反省自己，你懂吗？ <br />
　　五六、眼睛不要老是睁得那么大，我且问你，百年以后，那一样是你的。 <br />
　　五七、欲知世上刀兵劫，但听屠门夜半声。不要光埋怨自己多病，灾祸横生，多看看横死在你刀下的众生又有多少？ <br />
　　五八、憎恨别人对自己是一种很大的损失。 <br />
　　五九、每一个人都拥有生命，但并非每个人都懂得生命，乃至于珍惜生命。不了解生命的人，生命对他来说，是一种惩罚。 <br />
　　六十、自以为拥有财富的人，其实是被财富所拥有。 <br />
　　六一、情执是苦恼的原因，放下情执，你才能得到自在。 <br />
　　六二、随缘不是得过且过，因循苟且，而是尽人事听天命。 <br />
　　六三、不要太肯定自己的看法，这样子比较少后悔。 <br />
　　六十四、当你对自己诚实的时候，世界上没有人能够欺骗得了你。 <br />
　　六五、用伤害别人的手段来掩饰自己缺点的人，是可耻的。 <br />
　　六六、世间的人要对法律负责任。修行的人要对因果负责任。 <br />
　　六七、在你贫穷的时候，那你就用身体去布施，譬如说扫地、洒水、搬东西等，这也是一种布施。 <br />
　　六八、内心充满忌妒，心中不坦白，言语不正的人，不能算是一位五官端正的人。 <br />
　　六九、默默的关怀与祝福别人，那是一种无形的布施。 <br />
　　七十、多讲点笑话，以幽默的态度处事，这样子日子会好过一点。 <br />
　　七一、与人相处之道，在于无限的容忍。 <br />
　　七二、不要刻意去猜测他人的想法，如果你没有智慧与经验的正确判断，通常都会有错误的。 <br />
　　七三、要了解一个人，只需要看他的出发点与目的地是否相同，就可以知道他是否真心的。 <br />
　　七四、人生的真理，只是藏在平淡无味之中。 <br />
　　七五、不洗澡的人，硬擦香水是不会香的。名声与尊贵，是来自于真才实学的。有德自然香。 <br />
　　七六、与其你去排斥它已成的事实，你不如去接受它，这个叫做认命。 <br />
　　七七、佛菩萨只保佑那些肯帮助自己的人。 <br />
　　七八、逆境是成长必经的过程，能勇于接受逆境的人，生命就会日渐的茁壮。 <br />
　　七九、你要感谢告诉你缺点的人。 <br />
　　八十、能为别人设想的人，永远不寂寞。 <br />
　　八一、如果你能像看别人缺点一样，如此准确般的发现自己的缺点，那么你的生命将会不平凡。 <br />
　　八二、原谅别人，就是给自己心中留下空间，以便回旋。 <br />
　　八三、时间总会过去的，让时间流走你的烦恼吧！ <br />
　　八四、你硬要把单纯的事情看得很严重，那样子你会很痛苦。 <br />
　　八五、永远扭曲别人善意的人，无药可救。 <br />
　　八六、人不是坏的，只是习气罢了，每个人都有习气，只是深浅不同罢了。只要他有向道的心，能原谅的就原谅他，不要把他看做是坏人。 <br />
　　八七、说一句谎话，要编造十句谎话来弥补，何苦呢？ <br />
　　八八、其实爱美的人，只是与自己谈恋爱罢了。 <br />
　　八九、世界上没有一个永远不被毁谤的人，也没有一个永远被赞叹的人。当你话多的时候，别人要批评你，当你话少的时候，别人要批评你，当你沈默的时候，别人还是要批评你。在这个世界上，没有一个不被批评的。 <br />
　　九十、夸奖我们，赞叹我们的，这都不是名师。会讲我们，指示我们的，这才是善知识，有了他们我们才会进步。 <br />
　　九一、你目前所拥有的都将随着你的死亡而成为他人的，那为何不现在就布施给真正需要的人呢？ <br />
　　九二、为了赞美而去修行，有如被践踏的香花美草。 <br />
　　九三、白白的过一天，无所事事，就像犯了窃盗罪一样。 <br />
　　九四、能够把自己压得低低的，那才是真正的尊贵。 <br />
　　九五、广结众缘，就是不要去伤害任何一个人。 <br />
　　九六、沈默是毁谤最好的答覆。 <br />
　　九七、对人恭敬，就是在庄严你自己。 <br />
　　九八、拥有一颗无私的爱心，便拥有了一切。 <br />
　　九九、仇恨永远不能化解仇恨，只有慈悲才能化解仇恨，这是永恒的至理。 <br />
　　一００、你认命比抱怨还要好，对于不可改变的事实，你除了认命以外，没有更好的办法了。 <br />
　　一０一、不要因为众生的愚疑，而带来了自己的烦恼。不要因为众生的无知，而痛苦了你自己。 <br />
　　一０二、别人讲我们不好，不用生气、难过。说我们好也不用高兴，这不好中有好，好中有坏，就看你会不会用？ <br />
　　一０三、如果你自己明明对，别人硬说你不对，你也要向人忏悔，修行就是修这些。你什么事都能忍下来，才会进步。就是明明是你对，你也要向他人求忏悔，那就是修行了。 <br />
　　一０四、当你的错误显露时，可不要发脾气，别以为任性或吵闹，可以隐藏或克服你的缺点。 <br />
　　一０五、不要常常觉得自己很不幸，世界上比我们痛苦的人还要多。 <br />
　　一０六、愚痴的人，一直想要别人了解他。有智慧的人，却努力的了解自己。 <br />
　　一０七、别人永远对，我永远错，这样子比较没烦恼。 <br />
　　一０八、来是偶然的，走是必然的。所以你必须，随缘不变，不变随缘。 <br />
　　一０九、慈悲是你最好的武器。 <br />
　　一一０、只要面对现实，你才能超越现实。 <br />
　　一一一、良心是每一个人最公正的审判官，你骗得了别人，却永远骗不了你自己的良心。 <br />
　　一一二、不懂得自爱的人，是没有能力去爱别人的。 <br />
　　一一三、学佛就是在学做人而已。 <br />
　　一一四、正人行邪法，邪法亦正，邪人行正法，正法亦邪，一切唯心造。 <br />
　　一一五、有时候我们要冷静问问自已，我们在追求什么？我们活着为了什么？ <br />
　　一一六、不要因为小小的争执，远离了你至亲的好友，也不要因为小小的怨恨，忘记了别人的大恩。 <br />
　　一一七、勇于接受别人的批评，正好可以调整自己的缺点。 <br />
　　一一八、感谢上苍我所拥有的，感谢上苍我所没有的。 <br />
　　一一九、凡是能站在别人的角度为他人着想，这个就是慈悲。 <br />
　　一二０、学佛不是对死亡的一种寄托，而是当下就活得自在和超越。 <br />
　　一二一、佛陀从不勉强别人去做他不喜欢的事情，佛陀只是告诉众生，何者是善？何者是恶？善恶还是要自己去选择，生命还是要自己去掌握。 <br />
　　一二二、所谓的放下，就是去除你的分别心、是非心、得失心、执著心。 <br />
　　一二三、说话不要有攻击性，不要有杀伤力，不夸已能，不扬人恶，自然能化敌为友。 <br />
　　一二四、一个常常看别人缺点的人，自己本身就不够好，因为他没有时间检讨他自己。 <br />
　　一二五、是非天天有，不听自然无，是非天天有，不听还是有，是非天天有，看你怎么办？ <br />
　　一二六、真正的布施，就是把你的烦恼、忧虑、分别和执著心通通放下。 <br />
　　一二七、如果你真的爱他，那么你必须容忍他部份的缺点。 <br />
　　一二八、要克服对死亡的恐惧，你必须要接受世上所有的人，都会死去的观念。 <br />
　　一二九、所有的病患，医生最难治，所有的众生，自以为是的人最难渡。 <br />
　　一三０、一匹驴，吃再好的草，也不会成为一匹俊马。用执著和分别心去修行，再大的精进，也不会成佛。 <br />
　　一三一、了解永恒真理的人，就不会为任何的生离死别而哀伤悲泣，因为生离死别是必然的。 <br />
　　一三二、虽然你讨厌一个人，但却又能发觉他的优点好处，像这样子有修养的人，天下真是太少了。 <br />
　　一三三、若能一切随他去，便是世间自在人。 <br />
　　一三四、希望你常对自己说，闻到了佛法，我是最幸福的人，除了这幸福外，再没有别的了。 <br />
　　一三五、如果你能每天呐喊二十一遍「我用不着为这一点小事而烦恼」，你会发现，你心里有一种不可思议的力量，试试看，很管用的。 <br />
　　一三六、诚实的面对你内心的矛盾和污点，不要欺骗你自己。 <br />
　　一三七、因果不曾亏欠过我们什么，所以请不要抱怨。 <br />
　　一三八、我们确实有如是的优点，但也要隐藏几分，这个叫做涵养。 <br />
　　一三九、无事莫把闲话聊，是非往往闲话生。 <br />
　　一四０、大多数的人一辈子只做了三件事；自欺、欺人、被人欺。 <br />
　　一四一、太过于欣赏自己的人，不会去欣赏别人的优点。 <br />
　　一四二、活在别人的掌声中，是禁不起考验的人。 <br />
　　一四三、心是最大的骗子，别人能骗你一时，而它却会骗你一辈子。 <br />
　　一四四、坏孩子，父母总是比较操心。所以对于罪业愈深重的众生，我们更应该特别宽恕他怜愍他，而不应该远离他舍弃他。 <br />
　　一四五、只要自觉心安，东西南北都好。如有一人未度，切莫自己逃了。 <br />
　　一四六、用平常心来生活，用惭愧心来待人，心来处事，用菩提心契佛心。 <br />
　　一四七、当你手中抓住一件东西不放时，你只能拥有这件东西，如果你肯放手，你就有机会选择别的。人的心若死执自己的观念，不肯放下，那么他的智慧也只能达到某种程度而已。 <br />
　　一四八、人家怕你，并不是一种福，人家欺你，并不是一种辱。 <br />
　　一四九、不是某人使我烦恼，而是我拿某人的言行来烦恼自己。 <br />
　　一五０、不要刻意去曲解别人的善意，你应当往好的地方想。 <br />
　　一五一、世上的事，不如己意者，那是当然的。 <br />
　　一五二、我的财富并不是因为我拥有很多，而是我要求的很少。 <br />
　　一五三、吃了就一定要拉，人一定要学会随缘放下，否则就会？便秘。 <br />
　　一五四、常以为别人在注意你，或希望别人注意你的人，会生活的比较烦恼。 <br />
　　一五五、我能为你煮东西，但我不能为你吃东西。各人吃饭是各人饱，各人生死是个人了。 <br />
　　一五六、看轻别人很容易，要摆平自己却很困难。 <br />
　　一五七、人类最大的错误，在于不敢承担圣人的心。 <br />
　　一五八、你只管活你自己的，不必去介意别人的扭曲与是非。 <br />
　　一五九、如果你准备结婚的话，告诉你一句非常重要的哲学名言「你一定要忍耐包容对方的缺点，世界上没有绝对幸福爱猫扑.爱生活的婚姻，幸福只是来自于无限的容忍与互相尊重。」 <br />
　　一六０、如果你能够平平安安的渡过一天，那就是一种福气了。多少人在今天已经见不到明天的太阳，多少人在今天已经成了残废，多少人在今天已经失去了自由，多少人在今天已经家破人亡。 <br />
　　一六一、是非和得失，要到最后的结果，才能评定。 <br />
　　一六二、你不必和因果争吵，因果从来就不会误人。你也不必和命运争吵，命运它是最公平的审判官。 <br />
　　一六三、你有你的生命观，我有我的生命观，我不干涉你。只要我能，我就感化你。如果不能，那我就认命。 <br />
　　一六十四、你希望掌握永恒，那你必须控制现在。 <br />
　　一六五、恶口永远不要出自于我们的口中，不管他有多坏，有多恶。你愈骂他，你的心就被污染了，你要想，他就是你的善知识。 <br />
　　一六六、当你明天开始生活的时候，有人跟你争执，你就让他赢，这个赢跟输，都只是文字的观念罢了。当你让对方赢，你并没有损失什么。所谓的赢，他有赢到什么？得到什么？所谓的输，你又输到什么？失去什么？ <br />
　　一六七、我们大部份的生命都浪费在文字语言的捉摸上。 <br />
　　一六八、你不要常常觉得自己很委曲，你应该要想，他对我这样已经很好了，这就是修行的功夫。 <br />
　　一六九、别人可以违背因果，别人可以害我们，打我们，毁谤我们。可是我们不能因此而憎恨别人，为什么？我们一定要保有一颗完整的本性和一颗清净的心。 <br />
　　一七０、与任何人接触时，要常常问自己，我有什么对他有用？使他得益。如果我不能以个人的道德、学问和修持的力量，来使人受益，就等于欠了一份债。 <br />
　　一七一、出家是一生一世的事，修行是多生多劫的事。 <br />
　　一七二、信佛，学佛，不是为自己，乃是为一切苦海中的众生。 <br />
　　一七三、佛不渡无缘的人，不能渡的人，我们就把他当做菩萨来看。 <br />
　　一七四、如果一个人没有苦难的感受，就不容易对他人给予同情。你要学救苦救难的精神，就得先受苦受难。 <br />
　　一七五、一般人在遇到对方的权势大，财富大，气力大，在无可奈何的情形之下而忍，这算什么忍耐呢？真正的忍是，就算他欺负了你，对不住你，但他什么都不及你，你有足够的力量对付他，而你却能容忍他，认为他的本性和我一样，只是一时糊涂，或在恶劣的环境中受到熏染罢了，你不必与他计较，能在这样的情况及心境之下容忍那才是真正的忍耐。 <br />
　　一七六、如果我们放眼从累生历劫去看，那么一切的众生，谁不曾做过我的父母、兄弟姊妹、亲戚眷属？谁不曾做过我的仇敌冤家？如果说有恩，个个与我有恩；如果说有冤，个个与我有冤。这样子我们还有什么恩怨亲疏之别呢？再就智慧愚笨来说，人人有聪明的时候，也有愚痴的时候，聪明的人可能变愚痴，愚痴的人也可能变聪明。最坏的人，也曾做过许多好事，而且不会永远坏；好人也曾做过许多坏事，将来也不一定会好。如此我们反覆思索，所谓的冤亲、贤愚，这许多差别的概念，自然就会渐渐淡了。这绝对不是混沌，也不是不知好坏，而是要将我们无始以来的偏私差别之见，以一视同仁的平等观念罢了！ <br />
　　一七七、世界原本就不是属于你，因此你用不着抛弃，要抛弃的是一切的执著。万物皆为我所用，但非我所属。 <br />
　　一七八、宁可自己去原谅别人，莫让别人来原谅你。 <br />
　　一七九、当你用烦恼心来面对事物时，你会觉得一切都是业障，世界也会变得丑陋可恨。 <br />
　　一八０、欲为诸佛龙象，先做众生马牛。 <br />
　　一八一、虽然我们不能改变周遭的世界，我们就只好改变自己，用慈悲心和智慧心来面对这一切。
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 看过这些，你可能会理解为什么会有人将毕生的精力投入到佛学的研究之中，人生的真谛，可能就蕴蓄在这简单的文字之中。</p>
<table cellspacing="0" border="0">
    <tbody>
    </tbody>
</table>
<div class="footerLinks">
<div class="bvSection ContainerBorder BlogCommentPane SubContainer bvEntryComments bvCommentsPane" style="display: none" bv:cns="cns!4B0963DC7C796363!451" bv:nexttooltip="单击以查看后 20 项评论" bv:prevtooltip="单击以查看前 20 项评论"></div>
&nbsp;</div><img src="http://www.cnblogs.com/amgod/aggbug/883747.html?type=1" width="1" height="1" alt=""/><p>评论: 1　<a href="http://www.cnblogs.com/amgod/archive/2007/09/06/883747.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2007/09/06/883747.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>SQLite: Lean, Mean DB Machine</title><link>http://www.cnblogs.com/amgod/archive/2007/06/07/775063.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Thu, 07 Jun 2007 04:40:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2007/06/07/775063.html</guid><description><![CDATA[<p>阅读: 512 评论: 0 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2007-06-07 12:40 <a href="http://www.cnblogs.com/amgod/archive/2007/06/07/775063.html" target="_blank">原文链接</a></p><p>摘自：<a href="http://devzone.zend.com/article/863-SQLite-Lean-Mean-DB-Machine">zend</a>，作者：<a href="http://devzone.zend.com/member/414-aschlag">aschlag</a></p> <p>When most of us think of PHP, we think of developing for the web. In most cases we will be using a LAMP-based server setup, with our favorite web scripting language contributing the P. In most cases, the M is filled in with MySQL, although PHP does include support for several other database systems. Is a full-blown database server even necessary for most PHP applications? What about a data-driven website like a blog or a simple family photo album or message board? In these and may other cases, the small, simple, and extremely powerful SQLite may be all you need. Let's take SQLite out for a test drive and see how it performs, find some of the quirks you might run in to, and how to get the most use out of it. <h4>Warming It Up</h4> <p>SQLite has been a PHP staple since version 5, and is available as a PECL extension for PHP 4. There is also SQLite support in PDO; in fact, the PDO SQLite extension is the only way you can get support for SQLite 3. There are already some <a href="http://www.zend.com/php5/articles/php5-sqlite.php">good</a> <a href="http://www.zend.com/php/beginners/php101-9.php">articles</a> covering the SQLite 2 extension, so we are going to focus exclusively on PDO. This will also allow us to take advantage of SQLite 3's <a href="http://www.sqlite.org/version3.html">new features</a>. <p><strong>Warning</strong>: SQLite 3 uses a new (and incompatible) file format to store its databases. You can read SQLite 2 databases with SQLite 3, but the file will be converted to the SQLite 3 format. Once this is done you can't undo it. You have been warned! <p>PDO is standard in PHP 5.1, so if you're using the latest PHP release you have everything you need. The extension will be built by default, so unless you want Unicode support no extra configure options are needed. There is one caveat to building SQLite with PHP. If you are building the standard SQLite extension alongside PDO SQLite, then you should build them both shared or both not shared since standard SQLite now depends on PDO SQLite for some functionality. You should also enable the PDO extension before the SQLite extension in php.ini (see the <a href="http://www.php.net/manual/en/ref.sqlite.php">SQLite PHP documentation</a> for more details). <p>SQLite is also light on configuration options, because there aren't any! Two options that may affect you opening or creating a SQLite database file do exist, though. SQLite is safe_mode and open_basedir aware, which means if PHP is restricted by either option within the file system, you may get the following error: <p><code>safe_mode/open_basedir prohibits opening /tmp/litedb.sq3</code> <p>If you ever see this error you will either have to adjust your safe_mode/open_basedir settings or use a different directory/filename for you SQLite database. <h4>Test Drive</h4> <p>Now that we have the configuration basics out of the way, let's connect to a new SQLite database and try it out. PDO provides a standard interface to supported databases, and connecting is no different. The only unique part of connecting to a database is the DSN, which for SQLite consists of the driver prefix sqlite and the path to the database file: <p><code>$dbh = new PDO('sqlite:/path/to/my/sqlite.db3');</code> <p>It doesn't matter what the database file is called (or what extension it has), just as long as PHP/SQLite can find the file and open it. I use the db3 extension to differentiate that this is a SQLite 3 database. No username or password is required here since there is no server to log in to. <p>(<em>SQLite 2 Users</em>: PHP 5.1 provides a SQLite 2 driver for PDO; just use sqlite2 as the driver prefix instead. This is provided for backwards compatibility when you don't want to convert a database to SQLite 3) <p>From here you can do anything you would normally do with PDO. If you just created a new database, you probably should create a table to store data in: <p><code>$dbh-&gt;exec("CREATE TABLE table1 (id INTEGER PRIMARY KEY, col1 TEXT UNIQUE, col2 TEXT)");</code> <p>Now that we have a table, we can insert some data into our table using a prepared statement: <p><code>$stmt = $dbh-&gt;prepare("INSERT INTO table1 (col1, col2) VALUES (:col1, :col2)"); $stmt-&gt;bindParam(':col1', $col1_val); $stmt-&gt;bindParam(':col2', $col2_val); <br>// insert our data $col1_val = "sqlite"; $col2_val = "rocks"; $stmt-&gt;execute(); <br>$col1_val = "this needs to be unique"; $col2_val = "this doesn't!"; $stmt-&gt;execute();</code> <p>You can check the results with a simple SELECT query: <p><code>foreach ($dbh-&gt;query('SELECT * FROM table1', PDO::FETCH_ASSOC) as $row) { print_r($row); }</code> <p>We now have two rows in our database: <p>Id<br>col1<br>col2 <p>1<br>sqlite<br>rocks <p>2<br>this needs to be unique<br>this doesn't <p>Two things you should notice here if you haven't picked them up already. First, the id column has incremented values. In SQLite, if you set a field to INTEGER PRIMARY KEY, it will automatically be an AUTO INCREMENET column as well. The second thing to notice is the apostrophe for the second row we inserted in col2. PDO automatically did the right thing and made sure the data inserted was properly escaped when the query was executed. <p>We've covered the basics on creating a SQLite database and how to do a few standard queries, so now let's go over some of the unique features that make SQLite fast...and behave in strange ways if you're not careful. <h4>(Not So) Standard Features</h4> <p>One of the great features of using SQLite for storage instead of a flat file is that you can use standard SQL to manage your data as if you were using a more sophisticated database management system. However, there are some key features of SQL 92 that SQLite does not support. The most obvious is that SQLite lacks most of the standard SQL data types. To keep the library lean and mean, SQLite only supports the most basic data types that would cover all data you would see in a RDBMS. Here is the list of data types SQLite 3 uses: <ul> <li><strong>NULL</strong>: the values is simply a null value  <li><strong>INTEGER</strong>: a signed integer; it is stored in 8, 16, 24, 32, 48 or 64 bits, depending on the magnitude of the number  <li><strong>REAL</strong>: an 64 bit <a href="http://en.wikipedia.org/wiki/IEEE_floating-point_standard">IEEE floating point number</a> <li><strong>TEXT</strong>: any length text string; can be in ISO-8859-1, UTF-8 or UTF-16 encodings (UTF-16 will be either <a href="http://en.wikipedia.org/wiki/Endianness">big or little endian</a>, depending on your machine)  <li><strong>BLOB</strong>: a standard binary object that is stored exactly as input </li></ul> <p>Even though SQLite doesn't support all of the standard SQL data types, it does support the syntax of making a column VARCHAR(18), BIGINT, or DOUBLE. Just be aware that internally, SQLite is using one of the five types above to store your data. A column that is VARCHAR(18) is not going to store 18 characters for each row of data, neither will it complain if you insert a 19+ character string. This will also affect how your data is returned in a SELECT query (like the lengths to VARCHAR or NUMERIC) you set will be ignored. <p>There are some important and powerful SQL commands and statements that aren't supported, either. ALTER TABLE is limited to renaming a table (RENAME TABLE) and adding a column (ADD COLUMN). RIGHT and FULL OUTER JOIN are not implemented, either. More advanced features that are either partially supported or completely missing are foreign key constraints, triggers, nested transactions, and writing to views. GRANT and REVOKE are also missing, since they are unnecessary given SQLite's current implementation (no login required!). For most work though, SQLite is more than powerful enough to handle whatever data you throw at it. <p>The last feature (or lack thereof) of note in SQLite is its use of manifest typing. Manifest typing keeps the data's type with the data, not with the table column (which is known as static typing). Just as PHP will try and convert values into other types when it is expecting a different type than given, SQLite will try and do the same thing. For example, if we run the insert query above again with the following data: <p><code>$col1_val = 50870; $col2_val = 2308.4237988920; $stmt-&gt;execute();</code> <p>The values for $col1_val and $col2_val will be converted in to strings (TEXT type) and stored as such in SQLite. For a numeric column SQLite will try and convert the string into its numeric value. If there are ANY invalid characters in the string, the whole string will be stored as a string instead of a number (unlike PHP, which will convert "15abc" into 15 when expecting and integer). Finally, the only time SQLite will enforce a data type is when a column is declared as INTEGER PRIMARY KEY. Here an integer value is required. <h4>Built for Speed</h4> <p>There are several techniques that you can use to boost the performance of a SQLite database. Some of these may apply to other DBMS' too. <h5>Fire on All Cylinders</h5> <p>SQLite makes use of indexes (no, <a href="http://www.google.com/search?&amp;q=sql+indices">not indicies</a>!), so use them! If you are going to run a SELECT query using a particular column value (WHERE clause) or are going to perform a JOIN on a specific column, then by all means add an index to that column: <p><code>$dbh-&gt;exec('CREATE INDEX col2 ON table1 (col2)');</code> <p>As you can see, you don't need to alter a table to use an index. You can even create indexes on multiple columns if they are going to be used together in a WHERE or a JOIN. The only column you don't want to ever create an index on is a column that is declared INTEGER PRIMARY KEY (such as the column id above). SQLite automatically creates an index on those columns, and adding an additional index would just slow things down. In fact, this is a good rule of thumb for creating indexes in general. Don't use them unless you are going to perform a WHERE or JOIN on them. The overhead of keeping track to too many indexes on INSERT, UPDATE, or DELETE queries may offset the performance gain you would see on SELECT queries. <h5>Give it Some Gas</h5> <p>If you are going to be performing several updates (INSERT, UPDATE, DELETE) to a table at once, bundling them in a transaction will significantly increase the speed of the updates. SQLite will perform a hard disk write for each query that modifies the database, whereas if several updates were performed in a transaction SQLite will perform a single write for the entire transaction. PDO also makes transactions painfully simple. Here is the insert we did before as a transaction: <p><code>// insert our data, but use a transaction $dbh-&gt;beginTransaction(); <br>$col1_val = "sqlite"; $col2_val = "rocks"; $stmt-&gt;execute(); <br>$col1_val = "this needs to be unique"; $col2_val = "this doesn't!"; $stmt-&gt;execute(); <br>$dbh-&gt;commit();</code> <p>Not much to it really. Be aware though that if something catastrophic happens before you commit your transaction you will lose all the data you didn't yet save in the database. <h5>Pedal to the Metal</h5> <p>If you have read any of the other articles about PHP and SQLite you are probably familiar with the SQLite <a href="http://www.php.net/manual/en/function.sqlite-unbuffered-query.php">unbuffered query functions</a>. Well, lucky for you, PDO uses unbuffered queries by default (just ask <a href="http://netevil.org/node.php?uuid=bf0a58d7-68ab-49d0-9a29-f5ec97c5dfde">Wez</a>). Next! <h5>Get Under the Hood</h5> <p>SQLite supports the PRAGMA statement as a SQL command to set special parameters on the database. There is some great <a href="http://www.sqlite.org/pragma.html">documentation</a> on what you can do with PRAGMA, and there is one (safe) PRAGMA setting that will affect the speed of SQLite: <p><code>PRAGMA cache_size = &lt;NUMBER&gt;</code> <p>If you are going to perform quite a bit of UPDATEs or DELETEs, and you don't mind using a bit more memory, increasing cache_size can help speed things up a bit. This setting will reset after the database is closed. <p>The PRAGMA commands are a great way to query and tweak the internals of SQLite, so check out the documentation if you'd like to learn more. <h5>Reduce Drag</h5> <p>One final way you could potentially get greater speed out of SQLite is by creating an in-memory database. If you specify the path to your SQLite database in the PDO DSN as <code>:memory:</code> the SQLite driver will create an in-memory database instead of one in the file system. This database will be destroyed at the end of your PHP script, but may be useful in some situations where quick, temporary storage is necessary. <h4>Routine Maintenance</h4> <h5>Wash and Detailing</h5> <p>By default when you delete data from a SQLite database the space is kept and reused by SQLite, and thus is not available to use for other files. If you would like to free up this "reserved" space, then simply run the query VACUUM. If you desire to have this done for you by default you can set the PRAGMA value auto_vacuum if you haven't added any tables to a database yet. <h5>Tune Up</h5> <p>If you can properly order tables in JOINs and index the proper columns you will get the most performance on your queries. For example, SQLite will translate a JOINs into extra WHERE clauses. For example, the following SELECT statement: <p><code>SELECT * from table1 JOIN table2 ON table1.common = table2.common;</code> <p>Would be translated into this: <p><code>SELECT * from table1, table2 WHERE table1.common = table2.common;</code> <p>You won't see a significant speed increase with simple queries like this one, but if you have several queries that are JOINing tables, then it may not be a bad idea to do this kind of translation yourself. <p>Also try to have at least one index available when you are performing any kind of JOIN or query on more than one table. The idea here is to reduce the time it takes to iterate through both tables to find the values that meet your JOIN criteria. Try to make sure that the second table you specify is indexed on the column you are JOINing on. If you'd like more details, you can find them in this <a href="http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning">SQLite Wiki article</a>. <h5>Empty Out the Trunk</h5> <p>Each time you access a SQLite database in your PHP scripts you are reading another file from the filesystem (well, almost every time, but for the sake of argument let's keep it simple, ok?). The more data that is stored in the database, the longer it is going to take to load. So, what can you do about it? <p>The first rule of thumb is to avoid storing large binary files in your database. Store the path to the file instead, and set up a special directory to hold the files you would have normally stored in the database. For example, if you are developing a photo management system and wanted to have the ability to tag photos and create comments a la Flickr you could store the tags and comments in a SQLite database along with a "link" to where the actual photo is on your local files system. <p>If you just have a lot of data in general and SQLite is slowing you down, you may want to think about compressing data before it is stored in your database. This would make searching harder, but for fields that contain a significant amount of data compression may be beneficial. What's more, you could define your compress/decompress functions as User Defined Functions and call them through SQL, making the process completely seamless. Before you run off and implement compression though, make sure you test and see if you gain any actual speed improvements since the actual compression/decompression does make a hit on the CPU. <h4>Custom Parts</h4> <p>Two very cool ways to extend your use of SQLite are through the use of User Defined Functions (UDF) and User Defined Aggregate Functions. Both UDFs and aggregate functions allow you to create functions in PHP that you can then call through ordinary SQL statements. So, would you like an example? <h5>User Defined Functions</h5> <p>The sqliteCreateFunction() method contains all the magic to attach a PHP function to SQLite. Let's create a compression function to dynamically compress a large data field, like possibly an article from that new blog system you're working on. <p><code>function compress_data($data_string) { return gzcompress($data_string, 6); } <br>$dbh-&gt;sqliteCreateFunction('compress', 'compress_data', 1);</code> <p>We just registered our PHP function compress_data as a new SQLite function compress. We can now use compress in any query we'd like: <p><code>$stmt = $dbh-&gt;prepare("INSERT INTO articles (auth_id, date, article) VALUES (:auth_id, :date, compress(:article))");</code> <p>I will leave you to implement a decompress function. :) <h5>User Defined Aggregate Functions</h5> <p>Aggregate functions perform a function over a collection of data, such as the standard SQL functions avg() and stddev(). To operate on a collection of data you need to create two functions. The first function will be called for each individual piece of data. The other function will perform any other actions on the aggregated data and return the result. Here is an example that implements MySQL's <a href="http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#id2824629">GROUP_CONCAT</a> function: <p><code>function group_concat_step(&amp;$context, $string, $separator = ',') { $context .= $separator . $string; } <br>function group_concat_finalize(&amp;$context) { return $context; } <br>$dbh-&gt;sqliteCreateAggregate('group_concat', 'group_concat_step', 'group_concat_finalize', 2);</code> <p>To use it you can call <code>group_concat(column, ' * ')</code>. This differs slightly from MySQL, where the same function would be called as <code>GROUP_CONCAT(column SEPARATOR ' * ')</code>. <h4>Check Engine Light</h4> <p>As great as SQLite is, it may not be the best choice for your needs. SQLite does not handle large numbers of users as efficiently as a client/server RDBMS does. It also doesn't play well with network filesystems. As with any other piece of technology, make sure you evaluate SQLite first to see if it is right for you. You may be surprised. <h4>Finish Line</h4> <p>SQLite provides some very nice features as a zero configuration no overhead database system, and is a great addition to any PHP developer's toolbox. Yes, it may not always be the best tool for the job, but that's why PHP also supports MySQL, PostgreSQL, etc., etc. If you have any personal SQLite hints, tips, or gotchas please post them in the comments for all to share. Drive (and code) safely!<img src="http://www.cnblogs.com/amgod/aggbug/775063.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/amgod/archive/2007/06/07/775063.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2007/06/07/775063.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>测试使用windows live write发文章</title><link>http://www.cnblogs.com/amgod/archive/2007/05/31/765857.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Thu, 31 May 2007 00:51:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2007/05/31/765857.html</guid><description><![CDATA[<p>阅读: 108 评论: 1 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2007-05-31 08:51 <a href="http://www.cnblogs.com/amgod/archive/2007/05/31/765857.html" target="_blank">原文链接</a></p><p>测试一下</p><img src="http://www.cnblogs.com/amgod/aggbug/765857.html?type=1" width="1" height="1" alt=""/><p>评论: 1　<a href="http://www.cnblogs.com/amgod/archive/2007/05/31/765857.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2007/05/31/765857.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>男人25岁前的忠告</title><link>http://www.cnblogs.com/amgod/archive/2007/03/12/672331.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Mon, 12 Mar 2007 11:45:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2007/03/12/672331.html</guid><description><![CDATA[<p>阅读: 579 评论: 3 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2007-03-12 19:45 <a href="http://www.cnblogs.com/amgod/archive/2007/03/12/672331.html" target="_blank">原文链接</a></p><div class=textwrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;1. 男人是社会的主体，不管你信或不信。所以男人应该有种责任感。 <br>　　2. 25岁之前，请记得，爱情通常是假的，或者不是你所想象的那样纯洁和永远。如果你过了25岁，那么你应该懂得这个道理。 <br>　　3. 吃饭7成饱最舒服。对待女友最多也请你保持在7成。 <br>　　4. 30岁之前请爱惜自己的身体，前30年你找病，后30年病找你。如果你过了30岁，你自然也会懂得这个道理。 <br>　　5. 事业远比爱情重要。如果说事业都不能永恒，那么爱情只能算是昙花一现。 <br>　　6. 不要轻易接受追求你的女孩。女追男隔层纱。如果你很容易就陷进去，你会发现你会错过很多东西，失去很多东西。 <br>　　7. 请你相信，能用钱解决的问题，都不是问题。如果你认为钱索王道，有钱有女人，没钱没女人，那么。女人不是问题。 <br>　　8 . 请永远积极向上。每个男人都有他可爱的地方，但是不可爱的地方只有不积极面对生活。 <br>　　9. 不要连续2次让同一个女人伤害。好马不吃回头草，是有他道理的。如果认真考虑过该分手，那么请不要做任何舍不得的行动。 <br>　　10. 如果你和你前女友能做朋友，那么你要问自己：为什么？如果分手后还是朋友，那么只有2个可能:。你们当初都只是玩玩而已，没付出彼此最真的感情。或者：必定有个人是在默默的付出无怨无悔！ <br>　　11. 永远不要太相信女人在恋爱时的甜言蜜语。都说女人爱听甜言蜜语，其实，男人更喜欢。 <br>　　12. 请不要为自己的相貌或者身高过分担心和自卑。人是动物，但是区别于动物。先天条件并不是阻挡你好好生活的借口。人的心灵远胜于相貌，请相信这点。如果有人以相貌取人，那么你也没必要太在意。因为他从某种意义来讲，只是只动物。你会跟动物怄气吗？ <br>　　13. 失恋时，只有2种可能，要么你爱她她不爱你，或者相反。那么，当你爱的人不再爱你，或者从来没爱过你时。你没有遗憾，因为你失去的只是一个不爱你的人。 <br>　　14. 请不要欺骗善良的女孩。这个世界上，善良的女孩太少。 <br>　　15. 不能偏激的认为金钱万能，至少，金钱治不好艾滋病。 <br>　　16. 请一定要有自信。你就是一道风景，没必要在别人风景里面仰视。 <br>　　17. 受到再大的打击，只要生命还在，请相信每天的太阳都是新的。 <br>　　18. 爱情永远不可能是天平。你想在爱情里幸福就要舍得伤心。 <br>　　19. 如果你喜欢一个认为别人应该对她好的mm，请尽早放弃。没有人是应该对一个人好的。如果她不明白这个道理，也就是她根本不懂得珍惜。 <br>　　20. 不要因为寂寞而找gf，寂寞男人请要学会品味寂寞。请记住：即使寂寞，远方黑暗的夜空下，一定有人和你一样，寂寞的人不同，仰望的星空却是唯一。 <br>　　21. 任何事没有永远。也别问怎样才能永远。生活有很多无奈。请尽量充实自己，充实生活。请善待生活。 </div>
<div class=textwrap>　　男人有很多无奈，生活很累但是因为生活才有意义。当你以为你一无所有时，你至少还有时间，时间能抚平一切创伤。所以请不要流泪!</div><img src="http://www.cnblogs.com/amgod/aggbug/672331.html?type=1" width="1" height="1" alt=""/><p>评论: 3　<a href="http://www.cnblogs.com/amgod/archive/2007/03/12/672331.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2007/03/12/672331.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>闭关修炼了(打算出关了)</title><link>http://www.cnblogs.com/amgod/archive/2006/08/14/476134.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Mon, 14 Aug 2006 02:28:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2006/08/14/476134.html</guid><description><![CDATA[<p>阅读: 184 评论: 4 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2006-08-14 10:28 <a href="http://www.cnblogs.com/amgod/archive/2006/08/14/476134.html" target="_blank">原文链接</a></p><p>很久没上网了，最近一直在进行封闭式培训，有点郁闷。只好暂停更新</p><img src="http://www.cnblogs.com/amgod/aggbug/476134.html?type=1" width="1" height="1" alt=""/><p>评论: 4　<a href="http://www.cnblogs.com/amgod/archive/2006/08/14/476134.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2006/08/14/476134.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>IIS FAQ</title><link>http://www.cnblogs.com/amgod/archive/2006/06/24/434417.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Fri, 23 Jun 2006 19:34:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2006/06/24/434417.html</guid><description><![CDATA[<p>阅读: 275 评论: 0 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2006-06-24 03:34 <a href="http://www.cnblogs.com/amgod/archive/2006/06/24/434417.html" target="_blank">原文链接</a></p><span style="FONT-SIZE: 10pt" twffan="done">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.如何让asp脚本以system权限运行?</span>
<p style="FONT-SIZE: 10pt">　　修改你asp脚本所对应的虚拟目录，把"应用程序保护"修改为"低".... </p>
<p style="FONT-SIZE: 10pt">　　2.如何防止asp木马? </p>
<p style="FONT-SIZE: 10pt">　　基于FileSystemObject组件的asp木马<br>　　cacls %systemroot%\system32\scrrun.dll /e /d guests //禁止guests使用regsvr32 scrrun.dll /u /s //删除 </p>
<p style="FONT-SIZE: 10pt">　　基于shell.application组件的asp木马<br>　　cacls %systemroot%\system32\shell32.dll /e /d guests //禁止guests使用regsvr32 shell32.dll /u /s //删除 </p>
<p style="FONT-SIZE: 10pt">　　3.如何加密asp文件? </p>
<p style="FONT-SIZE: 10pt">　　从微软免费下载到sce10chs.exe 直接运行即可完成安装过程。<br>　　安装完毕后，将生成screnc.exe文件，这是一个运行在DOS PROMAPT的命令工具。<br>　　运行screnc - l vbscript source.asp destination.asp <br>　　生成包含密文ASP脚本的新文件destination.asp <br>　　用记事本打开看凡是""之内的，不管是否注解，都变成不可阅读的密文了，但无法加密中文。 </p>
<p style="FONT-SIZE: 10pt">　　4.如何从IISLockdown中提取urlscan? </p>
<p style="FONT-SIZE: 10pt">　　iislockd.exe /q /c /t:c:\urlscan </p>
<p style="FONT-SIZE: 10pt">　　5.如何防止Content-Location标头暴露了web服务器的内部IP地址? </p>
<p style="FONT-SIZE: 10pt">　　执行cscript c:\inetpub\adminscripts\adsutil.vbs set w3svc/UseHostName True，最后需要重新启动iis </p>
<p style="FONT-SIZE: 10pt">　　6.如何解决HTTP500内部错误? </p>
<p style="FONT-SIZE: 10pt">　　iis http500内部错误大部分原因主要是由于iwam账号的密码不同步造成的。我们只要同步iwam_myserver账号在com+应用程序中的密码即可解决问题。 </p>
<p style="FONT-SIZE: 10pt">　　执行cscript c:\inetpub\adminscripts\synciwam.vbs -v</p>
<p style="FONT-SIZE: 10pt">　　7.如何增强iis防御SYN Flood的能力? </p>
<p style="FONT-SIZE: 10pt">　　Windows Registry Editor Version 5.00 <br>　　[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] <br>　　'启动syn攻击保护。缺省项值为0，表示不开启攻击保护，项值为1和2表示启动syn攻击保护，设成2之后 <br>　　'安全级别更高，对何种状况下认为是攻击，则需要根据下面的TcpMaxHalfOpen和TcpMaxHalfOpenRetried值 <br>　　'设定的条件来触发启动了。这里需要注意的是，NT4.0必须设为1，设为2后在某种特殊数据包下会导致系统重启。 </p>
<p style="FONT-SIZE: 10pt">　　"SynAttackProtect"=dword:00000002 <br>　　'同时允许打开的半连接数量。所谓半连接，表示未完整建立的TCP会话，用netstat命令可以看到呈SYN_RCVD状态 <br>　　'的就是。这里使用微软建议值，服务器设为100，高级服务器设为500。建议可以设稍微小一点。 </p>
<p style="FONT-SIZE: 10pt">　　"TcpMaxHalfOpen"=dword:00000064 <br>　　'判断是否存在攻击的触发点。这里使用微软建议值，服务器为80，高级服务器为400。 </p>
<p style="FONT-SIZE: 10pt">　　"TcpMaxHalfOpenRetried"=dword:00000050 <br>　　'设置等待SYN-ACK时间。缺省项值为3，缺省这一过程消耗时间45秒。项值为2，消耗时间为21秒。 <br>　　'项值为1，消耗时间为9秒。最低可以设为0，表示不等待，消耗时间为3秒。这个值可以根据遭受攻击规模修改。 <br>　　'微软站点安全推荐为2。 </p>
<p style="FONT-SIZE: 10pt">　　"TcpMaxConnectResponseRetransmissions"=dword:00000001 <br>　　'设置TCP重传单个数据段的次数。缺省项值为5，缺省这一过程消耗时间240秒。微软站点安全推荐为3。 </p>
<p style="FONT-SIZE: 10pt">　　"TcpMaxDataRetransmissions"=dword:00000003 <br>　　'设置syn攻击保护的临界点。当可用的backlog变为0时，此参数用于控制syn攻击保护的开启，微软站点安全推荐为5。 </p>
<p style="FONT-SIZE: 10pt">　　"TCPMaxPortsExhausted"=dword:00000005 <br>　　'禁止IP源路由。缺省项值为1，表示不转发源路由包，项值设为0，表示全部转发，设置为2，表示丢弃所有接受的 <br>　　'源路由包，微软站点安全推荐为2。 </p>
<p style="FONT-SIZE: 10pt">　　"DisableIPSourceRouting"=dword:0000002 <br>　　'限制处于TIME_WAIT状态的最长时间。缺省为240秒，最低为30秒，最高为300秒。建议设为30秒。 </p>
<p style="FONT-SIZE: 10pt">　　"TcpTimedWaitDelay"=dword:0000001e </p>
<p style="FONT-SIZE: 10pt">　　8.如何避免*mdb文件被下载? </p>
<p style="FONT-SIZE: 10pt">　　安装ms发布的urlscan工具，可以从根本上解决这个问题。同时它也是一个强大的安全工具，你可以从ms的网站上获取更为详细的信息。 </p>
<p style="FONT-SIZE: 10pt">　　9.如何让iis的最小ntfs权限运行? </p>
<p style="FONT-SIZE: 10pt">　　依次做下面的工作:<br>　　a.选取整个硬盘：<br>　　system：完全控制 <br>　　administrator：完全控制 <br>　　(允许将来自父系的可继承性权限传播给对象) </p>
<p style="FONT-SIZE: 10pt">　　b.\program files\common files：<br>　　everyone：读取及运行 <br>　　列出文件目录 <br>　　读取 <br>　　(允许将来自父系的可继承性权限传播给对象) </p>
<p style="FONT-SIZE: 10pt">　　c.\inetpub\wwwroot： <br>　　iusr_machine：读取及运行 <br>　　列出文件目录 <br>　　读取 <br>　　(允许将来自父系的可继承性权限传播给对象) </p>
<p style="FONT-SIZE: 10pt">　　e.\winnt\system32： <br>　　选择除inetsrv和centsrv以外的所有目录，去除&#8220;允许将来自父系的可继承性权限传播给对象&#8221;选框，复制。 </p>
<p style="FONT-SIZE: 10pt">　　f.\winnt： <br>　　选择除了downloaded program files、help、iis temporary compressed files、offline web pages、system32、tasks、temp、web以外的所有目录<br>　　去除&#8220;允许将来自父系的可继承性权限传播给对象&#8221;选框，复制。 </p>
<p style="FONT-SIZE: 10pt">　　g.\winnt： <br>　　everyone：读取及运行 <br>　　列出文件目录 <br>　　读取 <br>　　(允许将来自父系的可继承性权限传播给对象) </p>
<p style="FONT-SIZE: 10pt">　　h.\winnt\temp：（允许访问数据库并显示在asp页面上） <br>　　everyone：修改 <br>　　(允许将来自父系的可继承性权限传播给对象) </p>
<p style="FONT-SIZE: 10pt">　　10.如何隐藏iis版本? </p>
<p style="FONT-SIZE: 10pt">　　一个黑客可以可以轻易的telnet到你的web端口，发送get命令来获取很多信息，iis存放IIS BANNER的所对应的dll文件如下： </p>
<p style="FONT-SIZE: 10pt">　　WEB:C:\WINNT\SYSTEM32\INETSRV\W3SVC.DLL <br>　　FTP:C:\WINNT\SYSTEM32\INETSRV\FTPSVC2.DLL <br>　　SMTP:C:\WINNT\SYSTEM32\INETSRV\SMTPSVC.DLL </p>
<p style="FONT-SIZE: 10pt">　　你可以用16进制编辑器去修改那些dll文件的关键字，比如iis的Microsoft-IIS/5.0 </p>
<p style="FONT-SIZE: 10pt">　　具体过程如下: <br>　　1.停掉iis iisreset /stop <br>　　2.删除%SYSTEMROOT%\system32\dllcache目录下的同名文件 <br>　　3.修改</p><img src="http://www.cnblogs.com/amgod/aggbug/434417.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/amgod/archive/2006/06/24/434417.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2006/06/24/434417.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>快速驱除U盘病毒</title><link>http://www.cnblogs.com/amgod/archive/2006/06/16/427868.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Fri, 16 Jun 2006 14:00:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2006/06/16/427868.html</guid><description><![CDATA[<p>阅读: 1688 评论: 2 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2006-06-16 22:00 <a href="http://www.cnblogs.com/amgod/archive/2006/06/16/427868.html" target="_blank">原文链接</a></p><span style="FONT-SIZE: 0.9em" twffan="done">&nbsp;&nbsp;&nbsp;&nbsp; 最近U盘病毒泛滥，追其根源其实是病毒寄居在电脑上通过U盘来传播，曾经用网上别人发的工具杀过，作用不大,基本上是治标不治本，只能同过修改注册表来彻底根除，方法如下：
<p>1、打开任务管理器（ctrl+alt+del或者任务栏右键点击也可），终止所有bittorrent.exe(或者ravmone.exe以下类推)的进程 </p>
<p>2、进入c:\windows，删除其中的bittorrent.exe</p>
<p>3、开始--&gt;运行,输入regedit进入注册表，在左边依次点开HK_Loacal_Machine\software\Microsoft\windows\CurrentVersion\Run\，在右边可以看到一项数值是c:\windows\bittorrent.exe的，删除掉 </p>
<p>4、完成后，病毒就被清除了。</p>
<p>对于U盘(MP3也算)如果中毒，则把文件夹选项中&#8220;隐藏受保护的操作系统文件&#8221;钩掉，点上&#8220;显示所有文件和文件夹&#8221;，点击确定，然后在U盘中会看到如下几个文件，autorun.inf，msvcr71.dl，bittorrent.exe这三个全都删除掉一个不剩，有的时候也许会有一个后缀为tmp的文件，也删除，完成后，病毒就清除了。</p>
</span><img src="http://www.cnblogs.com/amgod/aggbug/427868.html?type=1" width="1" height="1" alt=""/><p>评论: 2　<a href="http://www.cnblogs.com/amgod/archive/2006/06/16/427868.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2006/06/16/427868.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>去除KMPplayer2.9的驴头提示</title><link>http://www.cnblogs.com/amgod/archive/2006/06/12/423660.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Mon, 12 Jun 2006 02:59:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2006/06/12/423660.html</guid><description><![CDATA[<p>阅读: 921 评论: 2 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2006-06-12 10:59 <a href="http://www.cnblogs.com/amgod/archive/2006/06/12/423660.html" target="_blank">原文链接</a></p><span style="FONT-SIZE: 10pt" twffan="done">改换KMPplayer2.9,感觉好多了。唯一让我不爽的是，每次播放的时候总是出现一个驴头显示。于是鼓捣了一阵，最后终于使之不显示了。方法如下：<br><br>1、在插件---常规用途里找到Toaster for winamp classic。 <br>2、双击&#8220;Toaster for winamp classic v0.7.4&#8221;插件，点显示，将所有的钩全部取消。（如下图）<br></span><br><img style="WIDTH: 400px; HEIGHT: 342px" height=342 alt="" src="http://www.cnblogs.com/images/cnblogs_com/amgod/20060421_ff5921.gif" width=400 border=0 twffan="done"><br><br><span style="FONT-SIZE: 10pt" twffan="done">3、点确定，重新启动KMP，打开一个文件，ok，驴头不出现了。</span>
<p style="FONT-SIZE: 10pt">　　这时，将KMP最小化，又见到以前那个熟悉的右下角图标啦！</p><img src="http://www.cnblogs.com/amgod/aggbug/423660.html?type=1" width="1" height="1" alt=""/><p>评论: 2　<a href="http://www.cnblogs.com/amgod/archive/2006/06/12/423660.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2006/06/12/423660.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>HTTP错误代码解释</title><link>http://www.cnblogs.com/amgod/archive/2006/06/03/416544.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Sat, 03 Jun 2006 06:45:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2006/06/03/416544.html</guid><description><![CDATA[<p>阅读: 1746 评论: 0 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2006-06-03 14:45 <a href="http://www.cnblogs.com/amgod/archive/2006/06/03/416544.html" target="_blank">原文链接</a></p><p style="FONT-SIZE: 10pt">HTTP 400 - 请求无效 <br>HTTP 401.1 - 未授权：登录失败 <br>HTTP 401.2 - 未授权：服务器配置问题导致登录失败 <br>HTTP 401.3 - ACL 禁止访问资源 <br>HTTP 401.4 - 未授权：授权被筛选器拒绝 <br>HTTP 401.5 - 未授权：ISAPI 或 CGI 授权失败&nbsp; HTTP 403 - 禁止访问 <br>HTTP 403 - 对 Internet 服务管理器 (HTML) 的访问仅限于 Localhost <br>HTTP 403.1 禁止访问：禁止可执行访问 <br>HTTP 403.2 - 禁止访问：禁止读访问 <br>HTTP 403.3 - 禁止访问：禁止写访问 <br>HTTP 403.4 - 禁止访问：要求 SSL <br>HTTP 403.5 - 禁止访问：要求 SSL 128 <br>HTTP 403.6 - 禁止访问：IP 地址被拒绝 <br>HTTP 403.7 - 禁止访问：要求客户证书 <br>HTTP 403.8 - 禁止访问：禁止站点访问 <br>HTTP 403.9 - 禁止访问：连接的用户过多 <br>HTTP 403.10 - 禁止访问：配置无效 <br>HTTP 403.11 - 禁止访问：密码更改 <br>HTTP 403.12 - 禁止访问：映射器拒绝访问 <br>HTTP 403.13 - 禁止访问：客户证书已被吊销 <br>HTTP 403.15 - 禁止访问：客户访问许可过多 <br>HTTP 403.16 - 禁止访问：客户证书不可信或者无效 <br>HTTP 403.17 - 禁止访问：客户证书已经到期或者尚未生效 <br>HTTP 404.1 - 无法找到 Web 站点 <br>HTTP 404 - 无法找到文件 <br>HTTP 405 - 资源被禁止 <br>HTTP 406 - 无法接受 <br>HTTP 407 - 要求代理身份验证 <br>HTTP 410 - 永远不可用 <br>HTTP 412 - 先决条件失败 <br>HTTP 414 - 请求 - URI 太长 <br>HTTP 500 - 内部服务器错误 <br>HTTP 500.100 - 内部服务器错误 - ASP 错误 <br>HTTP 500-11 服务器关闭 <br>HTTP 500-12 应用程序重新启动 <br>HTTP 500-13 - 服务器太忙 <br>HTTP 500-14 - 应用程序无效 <br>HTTP 500-15 - 不允许请求 global.asa <br>Error 501 - 未实现 <br>HTTP 502 - 网关错误</p><img src="http://www.cnblogs.com/amgod/aggbug/416544.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/amgod/archive/2006/06/03/416544.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2006/06/03/416544.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item><item><title>[翻译] PHP安全 </title><link>http://www.cnblogs.com/amgod/archive/2006/05/30/413398.html</link><dc:creator>阿木戈多</dc:creator><author>阿木戈多</author><pubDate>Tue, 30 May 2006 12:28:00 GMT</pubDate><guid>http://www.cnblogs.com/amgod/archive/2006/05/30/413398.html</guid><description><![CDATA[<p>阅读: 417 评论: 0 作者: <a href="http://www.cnblogs.com/amgod/" target="_blank">阿木戈多</a> 发表于 2006-05-30 20:28 <a href="http://www.cnblogs.com/amgod/archive/2006/05/30/413398.html" target="_blank">原文链接</a></p><span style="FONT-SIZE: 10pt">[&nbsp;&nbsp;原书信息&nbsp;]<br>《SAMS&nbsp;Teach&nbsp;Yourself&nbsp;PHP&nbsp;in&nbsp;10&nbsp;Minutes》<br>Author:&nbsp;Chris&nbsp;Newman&nbsp;&nbsp;&nbsp;&nbsp;<br>Publisher&nbsp;:&nbsp;Sams&nbsp;Publishing&nbsp;<br>Pub&nbsp;Date&nbsp;:&nbsp;March&nbsp;29,&nbsp;2005&nbsp;<br>ISBN&nbsp;:&nbsp;0-672-32762-7&nbsp;<br>Pages&nbsp;:&nbsp;264&nbsp;<br><br>[&nbsp;&nbsp;翻译信息&nbsp;]<br>翻译人员：heiyeluren<br>翻译时间：2006-3-15<br>翻译章节：《Lesson&nbsp;24.&nbsp;PHP&nbsp;Security》<br>中文名称：PHP安全<br><br>&nbsp;<br><br>PHP勿庸置疑是非常强大的服务器端脚本语言，但是强大的功能总是伴随着重大的危险，在这章里，你将学习到使用PHP的安全模式来阻止一些PHP潜在的危险因素。<br><br><br>【&nbsp;安全模式&nbsp;】<br><br>PHP的安全模式提供一个基本安全的共享环境，在一个有多个用户帐户存在的PHP开放的Web服务器上。当一个Web服务器上运行的PHP打开了安全模式，那么一些函数将被完全的禁止，并且会限制一些可用的功能。<br><br><br>[&nbsp;&nbsp;使用安全模式来强制限制&nbsp;]<br>在安全模式下，一些尝试访问文件系统的函数功能将被限制。运行Web服务器用户ID，如果想要操作某个文件，则必须拥有该文件读取或者写入的访问权限，实现这个限制功能对于PHP来说是没有问题的。<br><br>在安全模式开启的时候，尝试读取或者写入一个本地文件的时候，PHP将检查当前访问用户是否是该目标文件的所有者。如果不是所有者，则该操作会被禁止。(写入权限：在较低级别的文件访问权限下，可能会允许读取或者写入系统操作系统的文件，通过PHP的安全模式实现了防止你操作另外一个用户文件的操作。当然，一个Web服务器可能能够访问一个具有全局写入权限的任意文件。)<br><br>当安全模式打开的时候，以下函数列表的功能将会受到限制：<br><br>chdir&nbsp;,&nbsp;move_uploaded_file,&nbsp;&nbsp;chgrp,&nbsp;&nbsp;parse_ini_file,&nbsp;&nbsp;chown,&nbsp;&nbsp;rmdir,&nbsp;&nbsp;copy,&nbsp;&nbsp;rename,&nbsp;&nbsp;fopen,&nbsp;&nbsp;require,&nbsp;&nbsp;highlight_file,&nbsp;&nbsp;show_source,&nbsp;&nbsp;include,&nbsp;&nbsp;symlink,&nbsp;&nbsp;link,&nbsp;&nbsp;touch,&nbsp;&nbsp;mkdir,&nbsp;&nbsp;unlink<br>&nbsp;<br>同样的，一些PHP扩展中的函数也将会受到影响。(加载模块：在安全模式下dl函数将被禁止，如果要加载扩展的话，只能修改php.ini中的扩展选项，在PHP启动的时候加载)<br><br>在PHP安全模式打开的时候，需要执行操作系统程序的时候，必须是在safe_mode_exec_dir选项指定目录的程序，否则执行将失败。即使允许执行，那么也会自动的传递给escapeshellcmd函数进行过滤。<br><br>以下执行命令的函数列表将会受到影响：<br>exec,&nbsp;shell_exec,&nbsp;passthru,&nbsp;system,&nbsp;popen<br><br>另外，背部标记操作符(`)也将被关闭。<br><br>当运行在安全模式下，虽然不会引起错误，但是&nbsp;putenv&nbsp;函数将无效。同样的，其他一些尝试改变PHP环境变量的函数set_time_limit,&nbsp;set_include_path&nbsp;也将被忽略。<br><br><br>[&nbsp;&nbsp;打开安全模式&nbsp;]<br>打开或者关闭PHP的安全模式是利用php.ini中的safe_mode选项。如果要激活安全模式给当前所有共享Web服务器的用户，只要设置配置选项为：<br><br>safe_mode&nbsp;=&nbsp;On<br><br>当函数在访问文件系统的时候将进行文件所有者的检查。缺省情况下，会检查该文件所有者的用户ID，当你能够修改文件所有者的组ID(GID)为&nbsp;safe_mode_gid&nbsp;选项所指定的。<br><br>如果你有一个共享库文件在你的系统上，当你碰到需要include或require的时候，那么你可以使用&nbsp;safe_mode_include_dir&nbsp;选项来设置你的路径，保证你的代码正常工作。(包含路径：&nbsp;如果你想要使用&nbsp;safe_mode_include_dir&nbsp;选项包含更多的包含路径，那么你可以象&nbsp;include_path&nbsp;选项一样，在Unix/Linux系统下使用冒号进行分割，在Windows下使用分号进行分割)<br><br>比如你想要在安全模式下包含&nbsp;/usr/local/include/php&nbsp;下的文件，那么你可以设置选项为：<br><br>safe_mode_include_dir&nbsp;=&nbsp;/usr/local/include/php<br><br>如果你的包含的文件是需要执行的，那么你可以设置&nbsp;safe_mode_exec_dir&nbsp;选项。比如你需要&nbsp;/usr/local/php-bin&nbsp;路径下的文件是可以执行的，那么可以设置选项为：<br><br>safe_mode_exec_dir&nbsp;=&nbsp;/usr/local/php-bin<br><br>(可执行：如果你执行的程序在&nbsp;/usr/bin&nbsp;目录下，那么你可以把这些的二进制文件，连接到你指定选项下能够执行的路径)<br><br>如果你想设置某些环境变量，那么可以使用&nbsp;safe_mode_allowed_env_vars&nbsp;选项。这个选项的值是一个环境变量的前缀，缺省是允许&nbsp;PHP_&nbsp;开头的环境变量，如果你想要改变，可以设置该选项的值，多个环境变量前缀之间使用逗号进行分割。<br><br>比如下面允许时区的环境变量&nbsp;TZ&nbsp;，那么修改该选项的值为：<br><br>safe_mode_allowed_env_vars&nbsp;=&nbsp;PHP_,TZ<br><br>&nbsp;<br><br>【&nbsp;其他的安全特征&nbsp;】<br>&nbsp;<br>除了安全模式以外，PHP还提供了许多其他许多特征来保证PHP的安全。<br><br><br>[&nbsp;&nbsp;隐藏PHP&nbsp;]<br>你能够在php.ini里使用&nbsp;expose_php&nbsp;选项来防止Web服务器泄露PHP的报告信息。如下：<br><br>expose_php&nbsp;=&nbsp;On<br><br>利用整个设置，你能够阻碍一些来自自动脚本针对Web服务器的攻击。通常情况下，HTTP的头信息里面包含了如下信息：<br><br>Server:&nbsp;Apache/1.3.33&nbsp;(Unix)&nbsp;PHP/5.0.3&nbsp;mod_ssl/2.8.16<br>OpenSSL/0.9.7c<br><br>在&nbsp;expose_php&nbsp;选项打开以后，PHP的版本信息将不包含在上面的头信息里。<br><br>当然，用户访问网站的时候同样能够看到&nbsp;.php&nbsp;的文件扩展名。如果你想整个的使用不同的文件扩展名，你需要在&nbsp;httpd.conf&nbsp;中找到如下这行：<br><br>AddType&nbsp;application/x-httpd&nbsp;.php<br><br>你就可以修改&nbsp;.php&nbsp;为任何你喜欢的文件扩展名。你能够指定任意多个的文件扩展名，中间使用空格进行分割。如果你想在服务器端使用PHP来解析&nbsp;.html&nbsp;和&nbsp;.htm&nbsp;文件的时候，那么你设置选项如下：<br><br>AddType&nbsp;application/x-httpd&nbsp;.html&nbsp;.htm<br><br>(解析HTML：配置你的Web服务器使用PHP去解析所有的HTML文件，但是如果非服务器端代码也需要PHP去解析，会影响服务器的性能。静态页面你可以使用不同的扩展名，这样能够消除对PHP脚本引擎的依赖，增强性能。)<br><br><br>[&nbsp;&nbsp;文件系统安全&nbsp;]<br><br>安全模式限制了脚本所有者只能访问属于自己的文件，但是你可以使用&nbsp;open_basedir&nbsp;选现来指定一个你必须访问的目录。如果你指定了一个目录，PHP将拒绝访问除了该目录和该目录子目录的其他目录。open_basedir&nbsp;选项能够工作在安全模式之外。<br><br>限制文件系统只能访问&nbsp;/tmp&nbsp;目录，那么设置选项为：<br><br>open_basedir&nbsp;=&nbsp;/tmp<br><br><br>[&nbsp;&nbsp;函数访问控制&nbsp;]<br><br>你能够在&nbsp;disable_functions&nbsp;选项中使用逗号分割来设定函数名，那么这些函数将在PHP脚本中被关闭。这个设置能够工作在安全模式之外。<br><br>disable_functions&nbsp;=&nbsp;dl<br><br>当然，同样的你能够使用&nbsp;disable_classes&nbsp;选项来关闭对一些类的访问。<br><br><br>[&nbsp;&nbsp;数据库安全&nbsp;]<br><br>假设你的PHP脚本中包含一个基于表单值来执行的Mysql查询：<br><br>$sql&nbsp;=&nbsp;"UPDATE&nbsp;mytable&nbsp;SET&nbsp;col1&nbsp;=&nbsp;"&nbsp;.&nbsp;$_POST["value"]&nbsp;.&nbsp;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;col2&nbsp;=&nbsp;'somevalue'";<br>$res&nbsp;=&nbsp;mysql_query($sql,&nbsp;$db);<br><br>你希望&nbsp;$_POST["value"]&nbsp;包含一个整数值来更新你的列&nbsp;col1。可是，一个恶意用户能够输入一个分号在表单字段里，接着，是一段他/她想被任意执行的SQL语句。<br><br>举例，假设下面是&nbsp;$_POST["value"]&nbsp;提交的值：<br><br>0;&nbsp;INSERT&nbsp;INTO&nbsp;admin_users&nbsp;(username,&nbsp;password)<br>VALUES&nbsp;('me',&nbsp;'mypassword');<br><br>那么当这个查询发送给Mysql查询的时候，那么就变成了下面这条SQL：<br><br>UPDATE&nbsp;mytable&nbsp;SET&nbsp;col1&nbsp;=&nbsp;0;<br>INSERT&nbsp;INTO&nbsp;admin_users&nbsp;(username,&nbsp;password)<br>VALUES&nbsp;('me',&nbsp;'mypassword');<br>WHERE&nbsp;col2&nbsp;=&nbsp;'somevalue';<br><br>这明显是一个有害的查询！首先这个查询会在&nbsp;mytable&nbsp;表里更新&nbsp;col1。这个并没有什么麻烦的，但是第二个表达式，它将执行&nbsp;INSERT&nbsp;表达式来插入一个能登陆的新管理员。第三个表达式就废弃了，但同时SQL解析器将抛出一个错误，这个有害的查询才完成。这个攻击就是大家常说的&nbsp;SQL&nbsp;injection（注：SQL注入）。<br><br>当然，SQL&nbsp;injection&nbsp;存在一个问题，对方必须了解你的数据库结构。在这个例子中，攻击者是知道你有一个表&nbsp;admin_users，并且知道包含&nbsp;username&nbsp;和&nbsp;password字段，同时，存储的密码是没有加密的。<br><br>除了你自己，一般的网站访问者是不知道这些关于数据库的信息。可是，如果你使用了一个开发源代码的在线电子商务程序，或者使用一个自由的讨论版程序，这些数据表的定义都是已知的，或者有一些用户能够访问到你的数据库。<br><br>此外，你的脚本输出会提示一个查询错误，这些信息里包含了很多关于数据库结构的重要信息。在一个正常工作的网站上，你应该考虑设置&nbsp;display_errors&nbsp;选项为&nbsp;off，并且使用&nbsp;log_errors&nbsp;来代替&nbsp;display_errors&nbsp;，把警告和错误信息插入到文件中。<br><br>(数据库权限：它是一个非常重要的东西，你只有正确的权限，才能通过脚本正确的连接数据库。你应该不要在脚本中使用管理员去连接数据库。如果你这么做，那么一个攻击者将可能获取全部的数据库权限，并且包括其他相同服务器的权限。攻击者将可能运行&nbsp;GRANT&nbsp;或&nbsp;CREATE&nbsp;USER&nbsp;命令来获取更多的访问权限。&nbsp;)<br><br>如果你要防止&nbsp;SQL&nbsp;injection&nbsp;攻击，你必须保证用户表单里提交的内容不是一个能够执行的SQL表达式。<br><br>前一个例子中，我们使用一个整型值来进行更新。如果在单引号后面跟上一个字符串，这个攻击者在分号之前必须提交一个闭合的引用在整个SQL表达式中。可是，当&nbsp;magic_quotes_gpc&nbsp;选项是开启的时候，在Web表单中提交的引号将自动被转义。<br><br>为了防止被恶意的攻击者进行&nbsp;SQL&nbsp;injection攻击，你应该总是确认提交的数据是合法的。如果你需要的是一个整数值，那么你可以使用&nbsp;is_numeric&nbsp;函数来测试这个表达值，或者使用&nbsp;settype&nbsp;函数来转换为一个数字，清除任何一个傻傻的SQL语句。<br><br>如果你开发的程序需要几个提交的值在一个SQL表达式里，你能够使用&nbsp;sprintf&nbsp;函数来构建一个SQL字符串，使用格式化字符来指示数据类型的每个值。看下面的例子：<br><br>$sql&nbsp;=&nbsp;sprintf("UPDATE&nbsp;mytable&nbsp;SET&nbsp;col1&nbsp;=&nbsp;%d<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;col2&nbsp;=&nbsp;'%s'",<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_POST["number"],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_escape_string($_POST["string"]));<br><br>在上一个例子中，整个Mysql的数据已经被使用，所以这个字符串已经通过&nbsp;mysql_escape_string&nbsp;函数进行过滤。对于其他数据库，你可以使用&nbsp;addslashes&nbsp;函数进行转义，或者使用其他方法。<br></span><img src="http://www.cnblogs.com/amgod/aggbug/413398.html?type=1" width="1" height="1" alt=""/><p>评论: 0　<a href="http://www.cnblogs.com/amgod/archive/2006/05/30/413398.html#pagedcomment" target="_blank">查看评论</a>　<a href="http://www.cnblogs.com/amgod/archive/2006/05/30/413398.html#commentform" target="_blank">发表评论</a></p><p><a href="http://job.cnblogs.com/" target="_blank">找优秀程序员，就在博客园</a></p><hr/><p>最新新闻：<br/>· <a href="http://news.cnblogs.com/n/59098/" target="_blank">美博客列20家值得关注纽约创业企业</a><span style="color:gray">(2010-03-18 23:49)</span><br/>· <a href="http://news.cnblogs.com/n/59097/" target="_blank">王建宙：希望在国内销售苹果iPad和iPhone</a><span style="color:gray">(2010-03-18 22:53)</span><br/>· <a href="http://news.cnblogs.com/n/59095/" target="_blank">传网易微博20号正式上线 门户网站角力微博</a><span style="color:gray">(2010-03-18 22:48)</span><br/>· <a href="http://news.cnblogs.com/n/59094/" target="_blank">蓝港CEO王峰谈3年开发感悟：有点唠叨像唐僧</a><span style="color:gray">(2010-03-18 22:07)</span><br/>· <a href="http://news.cnblogs.com/n/59093/" target="_blank">[视频]想做你的Code</a><span style="color:gray">(2010-03-18 22:03)</span><br/></p><p>编辑推荐：<a href="http://news.cnblogs.com/n/59068/" target="_blank">VS2010全球首发，京沪穗三地即将盛大发布</a><br/></p><p>网站导航：<a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/" target="_blank">个人主页</a>&nbsp;&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a>&nbsp;&nbsp;<a href="http://home.cnblogs.com/group/" target="_blank">小组</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com/q/" target="_blank">博问</a>&nbsp;&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;&nbsp;<a href="http://kb.cnblogs.com" target="_blank">知识库</a></p>]]></description></item></channel></rss>