{% else-1 %}
код

                        
1. <?php
2. // горизонтальная
3. $im = imagecreate( 800 ,20);
4. $shift = true ;
5. for( $i = 0 ; $i <800 ; $i += 10)
6. {
7. $color = imagecolorallocate
( $im ,255 ,255 , 255 );
8. imagerectangle ($im ,0 ,0 ,800 , 20,
$color );
9. $color = imagecolorallocate
( $im ,0 ,0 ,0 );
0. if( $shift )
1. {
2. $height = 16;
3. }
4. else
5. {
6. $height = 13;
7. imagestring ( $im ,2 ,($i - 6 ), 1, $i ,
$color );
8. }
9. imageline ( $im ,$i ,20 ,$i ,$height ,
$color );
0. $shift =!$shift ;
1. }
2. // вертикальная
3. $im = imagecreate( 30,800 );
4. $shift = true ;
5. for( $i = 0 ; $i <800 ; $i += 10)
6. {
7. $color = imagecolorallocate
( $im ,255 ,255 , 255 );
8. imagerectangle ($im ,0 ,0 ,30 ,800 ,
$color );
9. $color = imagecolorallocate
( $im ,0 ,0 ,0 );
0. if( $shift )
1. {
2. $height = 26;
3. }
4. else
5. {
6. $height = 23;
7. imagestring ( $im ,2 ,($height - 16),
( $i - 7), $i ,$color );
8. }
9. imageline ( $im ,$height ,$i , 30,$i ,
$color );
0. $shift =!$shift ;
1. ?>
2 22 0
0

Нет фото
Valen * 0.4
• 29 апр 2013, 13:05


Что этот код делает? Есть пример?