PHPͼƬ´¦ÀíÀà
<?php
/*
ͼƬ´¦Àíº¯Êý¹¦ÄÜ£ºËõ·Å¡¢¼ôÇС¢Ïà¿ò¡¢Ë®Ó¡¡¢Èñ»¯¡¢Ðýת¡¢·×ª¡¢Í¸Ã÷¶È¡¢·´É«
´¦Àí²¢±£´æÀúÊ·¼Ç¼µÄ˼·£ºµ±ÓÐͼƬÓиĶ¯Ê±×Ô¶¯Éú³ÉÒ»ÕÅÐÂͼƬ£¬ÃüÃû·½Ê½¿ÉÒÔ¿¼ÂÇÔÚÔͼƬµÄ»ù´¡ÉϼÓÉϲ½Ö裬ÀýÈ磺ͼƬÃû³Æ+__µÚ¼¸²½
*/
class picture{
var $PICTURE_URL;//Òª´¦ÀíµÄͼƬ
var $DEST_URL="temp__01.jpg";//Éú³ÉÄ¿±êͼƬλÖÃ
var $PICTURE_CREATE;//Òª´´½¨µÄͼƬ
var $TURE_COLOR;//н¨Ò»¸öÕæ²ÊͼÏó
var $PICTURE_WIDTH;//ÔͼƬ¿í¶È
var $PICTURE_HEIGHT;//ÔͼƬ¸ß¶È
/*
ˮӡµÄÀàÐÍ£¬Ä¬ÈϵÄΪˮӡÎÄ×Ö
*/
var $MARK_TYPE=1;
var $WORD;//¾¹ýUTF-8ºóµÄÎÄ×Ö
var $WORD_X;//ÎÄ×Öºá×ø±ê
var $WORD_Y;//ÎÄ×Ö×Ý×ø±ê
var $FONT_TYPE;//×ÖÌåÀàÐÍ
var $FONT_SIZE="12";//×ÖÌå´óС
var $FONT_WORD;//ÎÄ×Ö
var $ANGLE=0;//ÎÄ×ֵĽǶȣ¬Ä¬ÈÏΪ0
var $FONT_COLOR="#000000";//ÎÄ×ÖÑÕÉ«
var $FONT_PATH="font/simkai.ttf";//×ÖÌå¿â£¬Ä¬ÈÏΪËÎÌå
var $FORCE_URL;//ˮӡͼƬ
var $FORCE_X=0;//ˮӡºá×ø±ê
var $FORCE_Y=0;//ˮӡ×Ý×ø±ê
var $FORCE_START_X=0;//ÇÐÆðˮӡµÄͼƬºá×ø±ê
var $FORCE_START_Y=0;//ÇÐÆðˮӡµÄͼƬ×Ý×ø±ê
var $PICTURE_TYPE;//ͼƬÀàÐÍ
var $PICTURE_MIME;//Êä³öµÄÍ·²¿
/*
Ëõ·Å±ÈÀýΪ1µÄ»°¾Í°´Ëõ·Å¸ß¶ÈºÍ¿í¶ÈËõ·Å
*/
var $ZOOM=1;//Ëõ·ÅÀàÐÍ
var $ZOOM_MULTIPLE;//Ëõ·Å±ÈÀý
var $ZOOM_WIDTH;//Ëõ·Å¿í¶È
var $ZOOM_HEIGHT;//Ëõ·Å¸ß¶È
/*
²ÃÇУ¬°´±ÈÀýºÍ¹Ì¶¨³¤¶È¡¢¿í¶È
*/
var $CUT_TYPE=1;//²ÃÇÐÀàÐÍ
var $CUT_X=0;//²ÃÇеĺá×ø±ê
var $CUT_Y=0;//²ÃÇеÄ×Ý×ø±ê
var $CUT_;//²ÃÇеĿí¶È
var $CUT_HEIGHT=100;//²ÃÇеĸ߶È
/*
Èñ»¯
*/
var $SHARP="7.0";//Èñ»¯³Ì¶È
/*
͸Ã÷¶È´¦Àí
*/
var $ALPHA='100';//͸Ã÷¶ÈÔÚ0-127Ö®¼ä
var $ALPHA_X="90";
var $ALPHA_Y="50";
/*
ÈÎÒâ½Ç¶ÈÐýת
*/
var $CIRCUMROTATE="90.0";//×¢Ò⣬±ØÐëΪ¸¡µãÊý
/*
³ö´íÐÅÏ¢
*/
var $ERROR=array(
'unalviable'=>'ûÓÐÕÒµ½Ïà¹ØͼƬ!'
);
/*
¹¹Ô캯Êý£ºº¯Êý³õʼ»¯
*/
function __construct($PICTURE_URL){
$this->get_info($PICTURE_URL);
}
function get_info($PICTURE_URL){
/*
´¦ÀíÔͼƬµÄÐÅÏ¢,Ïȼì²âͼƬÊÇ·ñ´æÔÚ,²»´æÔÚÔò¸ø³öÏàÓ¦µÄÐÅÏ¢
*/
@$SIZE=getimagesize($PICTURE_URL);
if(!$SIZE){
exit($this->ERROR['unalviable']);
}
//µÃµ½ÔͼƬ
Ïà¹ØÎĵµ£º
ÕûÁË°ëÌì¿ÉËãÈÃÎÒÕû³öÀ´ÁË º¹°¡£¡
C:\xampp\apache\conf\http.conf ÅäÖÃ
<Directory />
Options FollowSymLinks
AllowOverride all
Order deny,allow
# Deny from all
</Directory>
н¨ÏîÄ¿myphp
ÐéÄâ»ú·¾¶ localhost ......
¡¡¡¡Ñ§Ï°Ä¿µÄ£ºÑ§»áÌí¼Óɾ³ýÐÞ¸ÄÊý¾Ý
¡¡¡¡mysql_query($exec);
¡¡¡¡µ¥Õâ¸öÓï¾ä¾Í¿ÉÒÔÖ´ÐÐËùÓеIJÙ×÷ÁË£¬²»Í¬µÄ¾ÍÊÇ$execÕâ¸ösqlÓï¾ä
¡¡¡¡Ìí¼Ó£º$exec="insert into tablename (item1,item2) values ('".$_POST['item1']."',".$_POST['item1'].")";
¡¡¡¡É¾³ý£º$exec="delete from tablename where...";
¡¡¡¡ÐÞ¸ ......
£±,ÀàµÄ½á¹¹ÉùÃ÷·½Ê½£º
¡¡¡¡ class ÀàÃû {
//ÀàÌå
}
£²£¬ÊôÐԺͷ½·¨µÄ¶¨Ò壻
¡¡¡¡Ê¹Óù¹Ô캯Êý£º
¡¡¡¡Ê¹ÓÃÎö¹¹º¯Êý£º
¡¡¡¡ÀàµÄʵÀý»¯£º
£³,¿ØÖÆ·ÃÎÊȨÏÞ£ºpublic , private protected;
£´ ......
Êý¾Ý¿âÊÇsqlserver2005,Êý¾Ý´æ´¢µÄ¾ßÌå±àÂë²»Ïê. µ½ÍøÉÏÕÒÁ˶ÎתÂ뺯Êý /* ¶¨Òå×Ö·ûת»»º¯Êý£¬½â¾ömssqlÖÐÎÄÂÒÂëÎÊÌâ */
function convert2utf8($string)
{
......
2200µÄ·¹ý¡£¡£PHP±¾ÉíÊǼòµ¥£¬µ«Ñ§PHP²»ÊÇÖ¸Äã×ßPHPÕâÌõ·£¬¶øÊÇÖ¸Äã×ßWEBÕâÌõ·£¬»áPHP£¬»¹Òª»áECSHOP,DZ,PHPCMS,µÛ¹úCMS¸÷´ó³ÌÐò£¬Äã»áÁËô£¿ºÃ£¬Äã˵ÄãPHPºÜºÃ£¬ÕâЩÎÒ¶¼»á£¬ÄÇAJAX?¿ÉÒÔÁé»îÔËÓã¿AJAXÒ²»á£¬ÄǺã¬FLEXÄã»áÁËô£¿¶¼»á£¬ºÃ£¬Äã¿ÉÒÔ×ÔÐÐÔÚWIN2003»òÕßLINUXÏÂÅäÖÃPHP»·¾³£¬»ñÈ¡×îÓÅ»·¾³ÁËô£¿ÈôÏë¸ß¹¤×Ê£¬ ......