If you are in trouble, please master [codePHP] [code] & nbsp; & lt ;? Php & nbsp; include (& quot; conn. php & quot;); if (isset ($ _ GET [page]) {$ page $ _ GET [page] ;}else {$ page1 ;}? & Gt; & nbsp; & lt ;? Phpif ($ master in case of trouble
[Code = PHP] [/code]
Include ("conn. php ");
If (isset ($ _ GET ['Page']) {
$ Page = $ _ GET ['Page'];
} Else {
$ Page = 1;
}
?>
If ($ page)
$ Page_size = 4;
$ Query = "select * from chanpin ";
$ Yue = mysql_query ($ query );
$ Message_count = mysql_num_rows ($ yue );
$ Page_count = ceil ($ message_count/$ page_size );
$ Offset = ($ page-1) * $ page_size;
$ Query = "select * from chanpin where id order by id desc limit $ offset, $ page_size ";
$ Arr = mysql_query ($ query, $ conn);?>
While ($ result = mysql_fetch_array ($ arr )){
?>
Name: | Size: Upload time:
"Width =" 300 "height =" 200 "/>
Product description:
}
?
If I call the image like this, but the image is distorted, what should I do? How can we avoid Image distortion?
------ Solution --------------------
Width = "300" height = "200"
If you limit the size, it will be distorted.
------ Solution --------------------
I wrote a JS processing method and put this code in the head label. (There may still be problems without careful debugging. check it again tomorrow)
HTML code