You don't need to pay attention to the garbled text of funny questions. & lt ;! DOCTYPE & nbsp; HTML & nbsp; PUBLIC & nbsp; "-// W3C // DTD & nbsp; HTML & nbsp; 4.01 & nbsp; Transitional // EN" & nbsp; "http://www.w3.org/TR/html4/lo tease than human silly problem
No need to pay attention to garbled places
New Document
5. it will feel and be internationalized.
Function m_substr ($ str, $ start, $ length ){
$ Str_length = $ start + $ length;
$ Tmp_str = "";
For ($ I = 0; $ I <$ str_length; $ I ++ ){
If (ord (substr ($ str, $ I, 1) = 0x0a ){
$ Tmp_str. ='
';
}
If (ord (substr ($ str, $ I, 1)> 0xa0 ){
$ Tmp_str. = substr ($ str, $ I, 2 );
$ I ++;
}
Else {
$ Tmp_str. = substr ($ str, $ I, 1 );
}
}
Return $ tmp_str;
}
If (isset ($ _ GET ['Page']) {
$ Page = $ _ GET ['Page'];
} Else {
$ Page = 1;
}
$ Counter = file_get_contents ("example.txt ");
$ Length = strlen ($ counter );
$ Page_count = ceil ($ length/400 );
$ Str = m_substr ($ counter, 0, ($ page-1) * 400 );
$ Str1 = m_substr ($ counter, 0, $ page * 400 );
Echo substr ($ str1, strlen ($ str), strlen ($ str1)-strlen ($ str ));
?>
Echo "Asad? : ". $ Page."/". $ page_count ."";
Echo "excuse me? ";
If ($ page> 1 ){
Echo "bike ?? ";
}
If ($ page <$ page_count ){
Echo "location ?? ";
}
Echo "β? ";
?>
?
I am copying textbooks now... I know this is a bad habit. But I won't write it, and I can't just use this 2b method. I would like to ask if there is any way to separate the html and php code? How can I create this file? I don't want to use template engines like smarty, because I don't actually do it ~ I only use introduction .. Share: More