php³£ÓõĻù±¾º¯Êý
phpµÄº¯Êý·ÖΪϵͳº¯Êý£¬Óû§º¯Êý
1£¬phpº¯Êý²»Çø·Ö´óСд
º¯ÊýÔÐÍ£º
·µ»ØÀàÐÍ º¯ÊýÃû³Æ£¨ÀàÐÍ ²ÎÊý£©
2.1£¬ÏµÍ³º¯ÊýÖг£ÓõÄÊýѧº¯Êý
abs(eumber) È¥¾ø¶ÔÖµ
sin(float) ÕýÏÒ¼ÆËãsin(x)
cos(float) ÓàÏÒ¼ÆËãcos(x)
log(float) ×ÔÈ»¶ÔÊý¼ÆËã
sqrt(float) ¿ªÆ½·½¸ù¼ÆËã
log10(float) 10»ùµ×µÄ¶ÔÊý
exp(float) ×ÔÈ»¶ÔÊýeµÄ´Î·½Öµ
pow(float x,float y) ´Î·½xµÄy´Î·½
pi() Ô²ÖÜÂÊ
rand([min]£¬[max]) È¡Ëæ»úÊý
2.2 ×Ö·û´®º¯Êý
strtolower() ×Ö·û´®×ªÎªÐ¡Ð´
strtoupper() ×Ö·û´®×ªÎª´óд
trim() ½ØÈ¥×Ö·û´®Ê×β¿Õ¸ñ
substr(string£¬start£¬[length]) È¡×Ó´®
strlen(string str) È¡µÃ×Ö·û´®³¤¶È
strpos(ĸ´®£¬´ý²é×Ö·û£¬[offset]) ѰÕÒ×Ö·û´®ÖÐij×Ö·û×îÏȳöÏÖ´¦
strcmp(str1,str2) ×Ö·û´®±È½Ï
2.3 Îļþϵͳº¯Êý£º
int filesize(string filename) »ñµÃÎļþ´óС
int feof(int fp) ²âÊÔÎļþÖ¸ÕëÊÇ·ñÖ¸µ½Îļþβ
int fopen(string filename,string mode) ´ò¿ªÎļþ»òÕßURL
int fclose(int fp) ¹Ø±ÕÒÑ´ò¿ªµÄÎļþ
string fread(int fp,int n) ¶ÁÈ¡ÎļþN¸ö×Ö½Ú
string fgets(int fp,int n) È¡µÃÎļþÖ¸ÕëËùÖ¸µÄÐÐ(ÊʺϴóÎļþ´¦Àí)
int fwrite(int fp,string string,int[n]) дÈëÎļþ
int fputs(int fp,string str,int[n]) дÈëÎļþ
int mkdir(string pathname,int mode) ½¨Á¢Ä¿Â¼
int rmdir(string dirname) ɾ³ýĿ¼
int rename(string oldname,string newname) ¸ÄÃû
2.4 ÍøÂ纯Êý£º
int fsockopen(string hostname,int port,int[errno],string[errstr],int
[timeout]) ´ò¿ªÍøÂçsocketÁ´½Ó
string gethostbyname(string hostname) DNS²éѯ£¬·µ»ØIPÍøÖ·
array gethostbynamel(string hostname) ·µ»Ø»úÆ÷Ãû³ÆµÄËùÓÐIP
2.5 MySQLÊý¾Ý¿âº¯Êý£º
int mysql_connect(string[hostnam
Ïà¹ØÎĵµ£º
$_POST ±äÁ¿ÓÃÓÚÊÕ¼¯À´×Ô method="post" µÄ±íµ¥ÖеÄÖµ¡£
$_POST ±äÁ¿
$_POST ±äÁ¿ÊÇÒ»¸öÊý×飬ÄÚÈÝÊÇÓÉ HTTP POST ·½·¨·¢Ë͵ıäÁ¿Ãû³ÆºÍÖµ¡£
$_POST ±äÁ¿ÓÃÓÚÊÕ¼¯À´×Ô method="post" µÄ±íµ¥ÖеÄÖµ¡£´Ó´øÓÐ POST ·½·¨µÄ±íµ¥·¢Ë͵ÄÐÅÏ¢£¬¶ÔÈκÎÈ˶¼ÊDz»¿É¼ûµÄ£¨²»»áÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸£©£¬²¢ÇÒ¶Ô·¢ËÍÐÅÏ¢µÄÁ¿Ò²Ã»ÓÐÏÞÖ ......
php ʹÓÃÃüÁîÐÐ×Ô±äÁ¿
ÔÚÃüÁîÐÐÀïÊäÈë³ÌÐò²ÎÊýÀ´¸ü¸ÄÆäÔËÐз½Ê½ÊǺܳ£¼ûµÄ×ö·¨¡£ÄãÒ²¿ÉÒÔ¶ÔCLI³ÌÐòÕâÑù×ö¡£PHP
CLI´øÓÐÁ½¸öÌØÊâµÄ±äÁ¿£¬×¨ÃÅÓÃÀ´´ïµ½Õâ¸öÄ¿µÄ£ºÒ»¸öÊÇ$argv±äÁ¿£¬Ëüͨ¹ýÃüÁîÐаѴ«µÝ¸øPHP½Å±¾µÄ²ÎÊý±£´æÎªµ¥¶ÀµÄÊý×éÔªËØ£»ÁíÒ»¸ö
ÊÇ$argc±äÁ¿£¬ËüÓÃÀ´±£´æ$argvÊý×éÀïÔªËØµÄ¸öÊý¡£
ÓÃ ......
When I deploy php application on apache, some problem come out, and solved. Here's the tips and problems solved.
0.How could I deploy an apache server armed with php, mysql, perl, and phpMyAdmin on the fly?
You need a package bundled with all these tools, xampp shall meet you needs, you can ......
1.»ù±¾Àà
//smarty_config.php
<?php
define('TEMPLATE_DIR','templates/');
define('COMPILE_DIR','templates_c/');
define('CONFIG_DIR','configs/');
define('CACHE_DIR','cache/');
?>
//View.class.php
<?php
//ÅäÖÃÎļþ
require_once 'configs/smart_config.php';
//SmartyÀà
require('smarty/ ......
ÔÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/01/25/29/
ѧϰÁËÒ»¶Îʱ¼äPHP£¬¾õµÃÓеãÊÕ»ñ¡£Ò²Ó¦¸Ã½«Ñ§¹ýµÄ¶«Î÷ÄóöÀ´É¹É¹ÁË£¬²»È»¾Í½»»Ø¸ø¿Î±¾ÁË¡£
PHPÊÇÊ²Ã´ÄØ£¿
PHP£¬Êdz¬¼¶Îı¾Ô¤´¦ÀíÓïÑÔ£¨PHP:Hypertext Preprocessor£©µÄËõд¡£PHP ÊÇÒ»ÖÖ HTML ÄÚǶʽµÄÓïÑÔ£¬ÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶ËÖ´ÐеÄǶÈëHTMLÎĵµµÄ½Å±¾ÓïÑÔ£¬Óï ......