ubuntu10.04ÅäÖÃapache+php+mysql
1.°²×°apache2.0
¡¡¡¡sudo apt-get install apache2
¡¡¡¡°²×°ºóÔÚä¯ÀÀÆ÷Öдò¿ª£º
¡¡
¡¡http://localhost/»òÕßhttp://127.0.0.1
¡¡¡¡Èç¹û³öÏÖIt works!£¬ÄÇÖ¤Ã÷°²×°³É¹¦¡£
¡¡
¡¡2.°²×°PHP
¡¡¡¡sudo apt-get install php
5 //°²×°PHP
5
¡¡
¡¡sudo apt-get install libapache2-mod-php5 //ÅäÖÃAPACHE+PHP
¡¡¡¡sudo
/etc/init.d/apache2 restart //ÖØÆôAPACHE
¡¡¡¡²âÊÔ£º
¡¡¡¡´ò¿ªgksudo
gedit /var/www/testphp.php
¡¡¡¡È»ºóËæÒâÊäÈëµã¶«Î÷£¨ÎÒÊäÈëµÄÊÇSD£©ÔÙ±£´æ¡£
¡¡¡¡È»ºóÔÚä¯
ÀÀÆ÷ÖÐÊäÈëhttp://127.0.0.1/testphp.php
»òÕßhttp://localhost/testphp.php
¡¡
¡¡Èç¹ûÏÔʾ³öÄãÊäÈëµÄ¶«Î÷¼´Îª³É¹¦
¡¡¡¡3.°²×°MYSQL
¡¡¡¡sudo apt-get install
mysql-server
¡¡¡¡°²×°Íê³É°´ÌáʾÉèÖÃrootÃÜÂë
¡¡¡¡4¡¢ÈÃapache¡¢php
Ö§³Ö
mysql
¡¡¡¡sudo apt-get install libapache2-mod-auth-mysql
¡¡¡¡
sudo apt-get install php5-mysql
¡¡¡¡sudo /etc/init.d/apache2
restart
¡¡¡¡ÖÁ´Ëapache2+php 5.2.4.2+mysql5.0.51µÄ»·¾³¾ÍÍê³ÉÁË¡£
Ïà¹ØÎĵµ£º
±àÒë°²×°
apache
ÏÂÔØapache°²×°
=============================
ÎÒ°ÑËû°²×°ÔÚ/usr/local/apacheĿ¼ÏÂ
tar -zxvf apacheÎļþ
½øÈë½âѹºóµÄĿ¼£¬ÅäÖÃ./configure --prefix=/usr/local/apache -enable-mods-shared=all -enable-so -enable-rewrite
make
make install
È»ºóÆô¶¯/usr/local/apache/bin/apachectl sta ......
±êÌâÓе㳤£¬Æäʵ¾ÍÊÇÓÃÀ´Ïòhttps·þÎñÆ÷postÊý¾Ý
function curlPost($url, $data, $timeout = 30)
{
$ssl = substr($url, 0, 8) == "https://" ? TRUE : FALSE;
$ch = curl_init();
$opt = array(
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_ ......
<?
//²åÈëÅÅÐò£¨Ò»Î¬Êý×飩
function insert_sort($arr){
¡¡$count = count($arr);
¡¡for($i=1; $i<$count; $i++){
¡¡¡¡$tmp = $arr[$i];
¡¡¡¡$j = $i - 1;
¡¡¡¡while($arr[$j] > $tmp){
¡¡¡¡¡¡$arr[$j+1] = $arr[$j];
¡¡¡¡¡¡$arr[$j] = $tmp;
¡¡¡¡¡¡$j--;
¡¡¡¡}
¡¡}
¡¡return $arr;
}
¡¡¡¡
//Ñ¡Ô ......
½ñÌ쿪ʼѧϰPHP£¬¸Ð¾õ¿´¹ý¾ÍÍüÁË£¬É¶¶¼Áô²»Ï±ȽÏÒź¶£¬¾Í±ß¿´±ß×ܽáÁË£¬·½±ã×Ô¼ºÒÔºó¿´£¬Ò²·½±ã±ðÈË¿ìËÙÈëÃÅ£¬»òÕß¿ìËÙ¸´Ï°°É(awen)¡£
µÚÒ»²¿·Ö ´î½¨Æ½Ì¨
1. ¿ÉÒÔÏÂÔØÒ»¸öphp for windows iis °æ±¾ ×îÊ¡¾¢£¬Ö±½Ó°²×°ºó×Ô¶¯Éý¼¶iisʹÆäÖ§³Öphp¹¦ÄÜ¡£
2.   ......
<?php
//µ¥ÀýģʽµÄÀàLock
class
Lock
{
//¾²Ì¬ÊôÐÔ$instance
  ......