Copyright statement: original works can be reproduced. During reprinting, you must mark the original publication, author information, and this statement in hyperlink form. Otherwise, legal liability will be held. Http://blog.csdn.net/mayongzhan-ma yongzhan, myz, mayongzhan program is common... the following is the code for converting ASP to PhP, although it is not clear in some places. basically, we can see that. any language can be converted to one another. above is Php and below is ASP <? PHP // keep class clsthief {// ______________ private $ value _; private $ SRC _; private $ isget _; Public Function setsrc ($ Str) {$ this-> SRC _ = $ STR;} public function getsrc () {return $ this-> SRC _;} public function getvalue () {return $ this-> value _;} public function getversion () {return "version 2005";} function _ con Struct () {$ this-> value _ = ""; $ this-> $ SRC _ = ""; $ this-> isget _ = false ;} function _ construct () {// construct} public function bytestobstr ($ body, $ cset) {$ objstream = new server. createobject ("ADODB. stream "); // What is this place... stream? $ Objstream-> type = 1; //... $ text = $ objstream-> readtext; // The returned result is ??? $ Objstream-> close; $ objstream = NULL;} public function steal () {if ($ this-> SRC _ = "") {$ HTTP = new server. createobject ("msxml2.xmlhttp"); // here is XML ?? $ Http-> open; //... if ($ http-> readystate! = 4) {exit (); // here is the middle finger execution} $ this-> value _ = $ this-> bytestobstr (HTTP. responsebody, "gb2312"); $ this-> isget _ = true; $ HTTP = NULL; if ($ err-> nulber! = 0) {// This should not be set to $ err-> clear;} else {echo "<script language = 'javascript '> alert ('set the src attribute first! '); </SCRIPT> ";}} Public Function Change ($ oldstr, $ Str) {if ($ this-> isget _ = false) {$ this-> steal (); $ this-> value _ = str_replace ($ this-> value _, $ oldstr, $ Str ); // here is the PHP function} public function cutx ($ head, $ BOT) {if ($ this-> isget _ = false) {$ this-> steal (); If (strstr ($ this-> value _, $ head) & strstr ($ this-> value _, $ BOT )) {// find $ head in $ this-> value and return true $ this-> value _ = false; // What is here ....} else {$ This-> value _ = "<p align = 'center'> the word does not exist </P>" ;}}}?> <HTML>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.