濡備綍浠庣綉绔欏紑鍙戣掑害鎻愰珮php瀹夊叏婕忔礊鐨勯槻鑼
绔欓暱缃 禄
寤虹珯
禄 濡備綍浠庣綉绔欏紑鍙戣掑害鎻愰珮php瀹夊叏婕忔礊鐨勯槻鑼
濡備綍浠庣綉绔欏紑鍙戣掑害鎻愰珮php瀹夊叏婕忔礊鐨勯槻鑼
鏉ユ簮:閮戝窞鎵瑰彂甯傚満 浣滆:16seo2014-03-21 10:30 鎴戞潵鎶曠
銆銆鐩鍓峆HP鍥犲叾鍔熻兘寮哄ぇ銆佸叆闂ㄧ畝鍗曘佷唬鐮佹墽琛屾晥鐜囬珮绛変紭鐐癸紝鎴愪负浜哤eb搴旂敤寮鍙戠殑娴佽岃瑷銆傜敱浜庝娇鐢ㄥ箍娉涳紝鎵浠ュ埄鐢≒HP瀹夊叏婕忔礊瀵筗eb缃戠珯杩涜岀殑鏀诲嚮涔熻秺鏉ヨ秺澶氾紝杩欑粰Web搴旂敤鐨勫畨鍏ㄥ甫鏉ヤ簡涓ラ噸濞佽儊銆傚圭綉绔欑殑瀹夊叏璐熸湁鐩存帴璐d换鐨勪富瑕佹湁涓ょ被浜哄憳:涓绫绘槸缃戠珯寮鍙戜汉鍛;涓绫绘槸缃戠珯绠$悊浜哄憳銆傛湰鏂囩瑪鑰呭氨浠庣綉绔欏紑鍙戠殑瑙掑害锛屽筆HP瀹夊叏婕忔礊鐨勯槻鑼冭繘琛屼簡杈冧负鍏ㄩ潰鐨勬荤粨銆佺爺绌躲
銆銆瀵逛互寰澶ч噺鏀诲嚮妗堜緥鐨勭爺绌惰〃鏄庯紝PHP瀹夊叏婕忔礊鐨勪骇鐢熷師鍥犱富瑕佹槸娌℃湁瀵圭敤鎴风殑杈撲汉杩涜屼弗鏍肩殑楠岃瘉鍜屽圭郴缁熺殑杈撳嚭娌℃湁杩涜岄傚綋鐨勮浆涔夈傜敤鎴风殑杈撳叆姘歌繙鏄涓嶅彲浠ョ洸鐩鐩镐俊鐨勶紝鍦ㄦ病鏈夎繘琛岄獙璇佸墠锛岄兘鍙浠ヨや负鏄琚姹℃煋鏁版嵁銆傜郴缁熺殑鎰夊嚭鍦ㄦ病鏈夐傚綋杞涔夊墠锛屼篃鏈夊彲鑳藉甫鏉ヨ緝澶х殑瀹夊叏椋庨櫓銆
銆銆1銆佹湭瀵圭敤鎴疯緭鍏ヨ繘琛屼弗鏍奸獙璇佷骇鐢熷畨鍏ㄦ紡娲炲強鍏堕槻鑼
銆銆鑰冭檻涓涓绯荤粺鐨勭櫥褰曢獙璇侊紝姝ょ郴缁熻佹眰鐢ㄦ敞鍐屾椂鎵濉鐨勯偖绠卞拰瀵嗙爜鐧诲綍銆備竴鑸鎯呭喌涓嬶紝鍙瑕佽緭鍏ユg‘鍗冲彲鐧诲綍锛屽傛灉杈撲汉閿欒鍒欎笉鍏佽哥櫥褰曪紝杩欐槸閫氬父鐨勫勭悊娴佺▼銆傚叾绋嬪簭瀹炵幇涓鑸鏄锛岄氳繃涓涓鐧诲綍琛ㄥ崟鑾峰彇鐢ㄦ埛杈撳叆鐨勯偖绠卞拰瀵嗙爜锛岀劧鍚庝紶閫掔粰绋嬪簭浠ユ瀯閫犱竴涓猄QL鏌ヨ㈣鍙ワ紝渚嬪:select count(*)from users where email='myemail@163.com'and password='mypass',鍐嶅皢姝SQL璇鍙ユ彁浜ょ粰鍚庡彴鏁版嵁搴撴墽琛岋紝鑻ヨ繑鍥炵殑璁板綍鏁颁负0锛屽垯璇存槑杈撲汉鐨勯偖绠变俊鎭鎴栧瘑鐮佹湁璇鎴栫敤鎴锋牴鏈娌℃湁娉ㄥ唽锛岀郴缁熸嫆缁濆叾鐧诲綍锛屽弽涔嬪垯涓哄悎娉曠敤鎴凤紝鍏佽稿叾鐧诲綍銆傝繖濂楅獙璇佹祦绋嬪逛簬涓鑸鐨勫㈡埛鏄鍗佸垎濂忔晥鐨勶紝鍏惰嫢娌℃湁娉ㄥ唽浜︽垨娌℃湁琚栦汉姝g‘鐨勯偖绠卞拰瀵嗙爜閮芥槸涓嶈兘鐧诲綍绯荤粺鐨勩備絾瀵逛簬榛戝㈡潵璇,鎯呭喌灏变笉涓鏍蜂簡銆傚叾瀹屽叏鍙浠ョ簿蹇冭捐′竴涓瀛楃︿覆鏉ヤ唬鏇垮悎娉曢偖绠卞湴鍧浠庤岀粫杩囩郴缁熺殑楠岃瘉锛屼緥濡:鑻ラ粦瀹㈣緭浜虹殑閭绠卞湴鍧鏄“myemail"orI=I--"銆佸瘑鐮佹槸"myppass"锛屾ゆ椂SQL璇鍙ュ彉涓簊elect count(*)from users wherer email='myemail' or I=I--" and password='mypass' ,姝よ鍙ユ墽琛屽悗鎵杩斿洖鐨勮板綍鏁版槸users琛ㄧ殑鎵鏈夎板綍鎬绘暟锛屽苟涓嶄负0锛屾墍浠ラ氳繃浜嗙郴缁熺殑鐧诲綍楠岃瘉锛岀郴缁熷厑璁稿叾鐧诲綍銆傝繖灏辨槸钁楀悕鐨凷QL娉ㄥ叆鏀诲嚮銆傚艰嚧杩欎釜鍚庢灉鐨勫師鍥犳槸榛戝㈢簿蹇冩瀯閫犱簡涓涓瀛楃︿覆鐢ㄤ簬浠f浛鍚堟硶閭绠卞湴鍧涓旂郴缁熷苟鏈瀵圭敤鎴疯緭鍏ョ殑鏁版嵁鏈韬杩涜屽悎娉曟ф鏌ャ
銆銆涓轰簡瀵逛笂杩癙HP瀹夊叏婕忔礊杩涜岄槻鑼冿紝鎴戜滑鍙浠ュ圭敤鎴风殑杈撲汉杩涜屽悎娉曟ч獙璇併傛ゅ勮佹眰鍏ョ殑鏄閭绠卞湴鍧锛屼负浜嗗圭敤鎴疯緭鍏ョ殑鏁版嵁鏈韬杩涜屽悎娉曟ф鏌ワ紝鎴戜滑鍙浠ョ敤姝e垯琛ㄨ揪寮忓圭敤鎴疯緭浜虹殑閭绠卞湴鍧杩涜岄獙璇侊紝鐪嬫槸鍚︾﹀悎姝g‘鐨勯偖绠辨牸寮忥紝杩欐牱灏卞彲浠ュぇ澶у炲姞榛戝㈣捐$壒娈婂瓧绗︿覆鐨勯毦搴︼紝鍦ㄤ竴瀹氱▼搴︿笂闃叉SQL娉ㄤ汉婕忔礊鐨勪骇鐢熴
銆銆鍦ㄤ换浣曟倓鍐典笅锛屽傛灉瀵圭敤鎴风殑杈撲汉鍧囪繘琛屼弗鏍肩殑楠岃瘉锛屽綋鐒讹紝楠岃瘉鏂规硶鏍规嵁涓嶅悓鎯呭喌鑰屾湁鎵涓嶅悓锛屽苟涓嶅眬闄愪簬姝e垯琛ㄨ揪寮忥紝杩欏氨鍙浠ュ湪寰堝ぇ绋嬪害涓婂筆HP瀹夊叏婕忔礊杩涜岄槻鑼冦
銆銆2銆佹湭瀵圭郴缁熺殑杈撳嚭杩涜岄傚綋杞涔変骇鐢熷畨鍏ㄦ紡娲炲強鍏堕槻鑼
銆銆鏈瀵圭郴缁熺殑杈撳嚭杩涜岄傚綋杞涔変篃浼氫骇鐢熷畨鍏ㄦ紡娲烇紝璺ㄧ珯鑴氭湰婕忔礊灏辨槸涓涓寰堣憲鍚嶇殑渚嬪瓙銆傚亣璁炬湁涓涓鍙浠ュ彂琛ㄨ瘎璁虹殑绯荤粺锛屽叾閲囩敤琛ㄥ崟鐨勫舰寮忚繘琛屾暟鎹鎻愪氦銆傚逛簬涓鑸鐢ㄦ埛锛岃繖涓嶄細鏈変粈涔堝お澶ч棿棰橈紝浣嗘槸瀵逛簬榛戝锛岄棶棰樺氨鏉ヤ簡銆傚洜涓洪粦瀹㈠苟涓嶆槸鐪熺殑鎯冲彂琛ㄤ粈涔堣瘎璁猴紝鍏舵湁鍙鑳芥槸鎯崇洍鍙栧叾浠栫櫥褰曠敤鎴风殑cookies銆備负浜嗙洍鍙栧叾浠栧綍鐢ㄦ埛鐨刢ookies, 榛戝彲浠ュ皢javascript浠g爜浣滀负璇勮哄唴瀹硅繘琛屾彁浜ゃ
銆銆濡傛灉鍦ㄨ緭鍑哄墠瀵归粦瀹㈡墍鎻愪氦鐨勫唴瀹逛笉鍋氫换浣曡浆涔夌殑璇濓紝閭d箞lavascript浠g爜灏嗚鍏朵粬鐢ㄦ埛鐨勬祻瑙堝櫒鎵鎵ц岋紝浠庤屽皢娴忚堣瘎璁虹殑鍏朵粬鐧诲綍鐢ㄦ埛鐨刢ookies淇℃伅鍙戦佸埌榛戝㈡墜涓娿備负浜嗛槻鑼冧笂杩拌法绔欒剼鏈婕忔礊鏀诲嚮锛屾垜浠鎵瑕侀噰鍙栫殑鎺鏂藉緢绠鍗:鍦ㄥ皢璇勮哄唴瀹硅緭鍑哄埌瀹㈡埛绔娴忚堝櫒涔嬪墠锛屽埄鐢╤tmlentities()鍑芥暟瀵硅緭鍑哄唴瀹硅繘琛岃浆涔夈傛ゅ嚱鏁板彲浠ュ皢杈撳嚭鍐呭瑰綋涓鍙鑳藉寘鍚鐨刪tml鏍囩捐浆鎹㈡垚html瀹炰綋锛屼粠鑰屼娇寰楅粦瀹㈣緭鍏ョ殑Javascript浠g爜涓嶈鎵ц屻
銆銆浠讳綍鎯呭喌涓嬶紝瀵逛簬绯荤粺鐨勮緭鍑洪兘搴旇ヨ繘琛岄傚綋鐨勮浆涔(杞涔夋柟娉曟牴鎹涓嶅悓鎯呭喌鑰屾湁鎵涓嶅悓锛屽苟涓嶅眬闄愪簬htmlentities()鍑芥暟)锛岃繖鏍锋墠涓嶄細璁╅粦瀹㈡湁鏈哄彲涔樸
銆銆澹版槑锛氭湰鏂囩敱閮戝窞鎵瑰彂甯傚満锛歨ttp://http://www.zjjv.com//market/ 鍘熷垱鎶曠匡紝灏婇噸浠栦汉鎴愭灉锛岃浆杞借锋敞鏄庡嚭澶!
锛璐d换缂栬緫:A5chenlong锛
鐩稿叧闃呰
鍏抽敭璇嶏細