PHPÃüÁîÐбà³ÌʵÀý£ºFTP+SSL¼òµ¥¿Í»§¶ËʾÀý
ÓÐͬѧÐèҪʹÓÃSSL+FTPµÄ·½Ê½¼ÓÃÜ´«ÊäÎļþ¡£Ï£ÍûÎÒ¸ø·â×°Ò»¸ö¶«Î÷£¬ÐèÇó¾ÍÊÇ¿ÉÒÔÉÏ´«Îļþ£¨PUT£©ºÍÔ¶¶Ë¸ÄÃû£¨RENAME£©¾ÍÐС£
ÎÒ¿ªÊ¼ÒÔΪSSL+FTP = SFTP£¬ºóÀ´·¢ÏÖÕâ¸öÏë·¨ºÃÏñÊÇ´íÎóµÄ¡£SFTPÊÇÅÜÔÚSSHÐÒéÉÏÃæµÄFTP£¬¶øFTPs¾ÍÏñhttpsÒ»ÑùÊÇÅÜÔÚSSLÐÒéÉÏÃæµÄFTP¡£
ʾÀý³ÌÐòʹÓÃÁËftp_ssl_connectº¯Êý¡£Ô´´úÂëÈçÏ£º
#! /bin/php
<?php
if($argc!=8){
echo "Usage:\n";
echo "\t$argv[0] put host port user pass local_file remote_file\n";
echo "\t$argv[0] rename host port user pass old_name new_name\n";
return -1;
}
$host = $argv[2];
$port = $argv[3];
$user = $argv[4];
$pass = $argv[5];
//connect to sftp
$ftps = ftp_ssl_connect($host,$port,10) or die("ERROR:Couldn't connect to $host");
if(@ftp_login($ftps, $user, $pass)){
ftp_pasv($ftps,TRUE);
if($argv[1]== 'put'){
//upload local file
$local_file = $argv[6];
$remote_file = $argv[7];
if(ftp_put($ftps,$remote_file,$local_file,FTP_BINARY)){
echo "PUT Successed.\n";
}else{
echo "PUT Failed.\n";
}
}else if($argv[1] == 'rename'){
//rename remote file
$old_name = $argv[6];
$new_name = $argv[7];
if(ftp_rename($ftps,$old_name,$new_name)){
echo "RENAME Successed.\n";
}else{
echo "RENAME Failed.\n";
}
}
ftp_close($conn_id);
}else{
echo "ERROR:Couldn't login\n";
}
?>
¸½×¢£ºÈç¹ûʹÓÃftp_ssl_connectº¯Êý£¬ÐèÒªphpÖ§³ÖOpenSSLºÍFTP²ÅÐС£
Ïà¹ØÎĵµ£º
¡öPDOΪºÎÎ
POD£¨PHP Data Object£©À©Õ¹ÔÚPHP5ÖмÓÈ룬PHP6Öн«Ä¬ÈÏʶÓÃPDOÁ¬½ÓÊý¾Ý¿â£¬ËùÓзÇPDOÀ©Õ¹½«»áÔÚPHP6±»´ÓÀ©Õ¹ÖÐÒƳý¡£¸ÃÀ©Õ¹ÌṩPHPÄÚÖÃÀà PDOÀ´¶ÔÊý¾Ý¿â½øÐзÃÎÊ£¬²»Í¬Êý¾Ý¿âʹÓÃÏàͬµÄ·½·¨Ãû£¬½â¾öÊý¾Ý¿âÁ¬½Ó²»Í³Ò»µÄÎÊÌâ¡£
ÎÒÊÇÅäÖÃÔÚwindowsÏÂ×ö¿ª·¢Óõġ£
¡öPDOµÄÄ¿±ê
ÌṩһÖÖÇáÐÍ¡¢ÇåÎú¡¢·½±ãµÄ A ......
Ëæ×ÅWeb2.0µÄÉýλ¥ÁªÍøµÄ·¢Õ¹ÓÀ´ÐÂÒ»ÂÖµÄÈȳ±£¬ÓÉÓÚ»¥ÁªÍø±¾ÉíµÄ¿ìËÙ·¢Õ¹¡¢²»¶Ï´´ÐµÄÌص㣬¾ö¶¨ÁËÖ»ÓÐÒÔ×î¿ì¿ª·¢ËٶȺÍ×îµÍ³É±¾£¬²ÅÄÜȡʤ£¬²ÅÄÜʼÖÕ±£³ÖÒ»¸öÍøÕ¾µÄÁìÏÈÐÔºÍÎüÒý¸ü¶àµÄÍøÃñ¡£
»¥ÁªÍøµÄÆóÒµÉú´æºÍ¾ºÕùµÄºËÐÄÔÚÓÚ¼¼Êõ£¬¼¼Êõ/Ñз¢È˲ÅÓÀÔ¶ÊÇÕâЩÆóÒµ²»¿É»òȱµÄ¹Ø¼üÈËÎֻÓÐÓµÓÐ×ÊÉ ......
phpµ÷ÓÃoracleÐд洢¹ý³Ì############################################################
PHP³ÌÐò·ÃÎÊÊý¾Ý¿â£¬ÍêÈ«¿ÉÒÔʹÓô洢¹ý³Ì£¬ÓÐÈËÈÏΪʹÓô洢¹ý³Ì±ãÓÚά»¤
²»¹ýÈÊÕß¼ûÈÊ£¬ÖÇÕß¼ûÖÇ¡£
ÔÚÕâ¸öÎÊÌâÉÏ£¬Å¼ÈÏΪʹÓô洢¹ý³ÌÒâζ×űØÐëÒªDBAºÍ¿ª·¢ÈËÔ±¸ü½ôÃÜÅäºÏ,Èç¹ûÆäÖÐÒ»·½¸ü±ä£¬ÔòÏÔÈ»ÄÑÒÔά»¤¡£
µ«ÊÇʹÓô洢 ......
PhpÁ¬½ÓmysqlµÄº¯ÊýÈçÏ£º
mysql_connect("Ö÷»úÃû","Óû§Ãû","ÃÜÂë");//´ò¿ªÒ»¸öÁ¬½Ó
mysql_select_db("´ò¿ªÊý¾Ý¿â",Á¬½Ó±êʶ·û);//´ò¿ªÒ»¸öÊý¾Ý¿â
$conn=@mysql_connect("localhost","root","") or die("Á´½Ó´íÎó");ÕâÀï@¿ÉÒÔÒþ²Ø´íÎóÌáʾ,or die¿ÉÒÔÔÚ´íÎóµÄʱºòÏÔʾ¡£
Ö´ÐÐsqlÓï¾äµÄº¯Êý:
mysql_query();
$sql= ......
<?
* +-------------------------------------------------------------+
* | Copyright (c) 2008-2009 Diqiye.Com All rights reserved.
* +-------------------------------------------------------------+
* | Info : ͼÏñ´¦ÀíÀà
* +------------------------------------------------------------ ......