導航:首頁 > 版本升級 > 自定義加密php文件

自定義加密php文件

發布時間:2024-03-30 05:15:08

❶ 濡備綍緇檖hp浠g爜鍔犲瘑

婧愪唬鐮佸姞瀵嗚蔣浠舵帹鑽愪嬌鐢寰蜂漢鍚堢戞妧鐨勫姞瀵嗚蔣浠訛紝鏄涓濂椾粠婧愬ご涓婁繚闅滄暟鎹瀹夊叏鍜屼嬌鐢ㄥ畨鍏ㄧ殑杞浠剁郴緇熴傞噰鐢ㄧ殑鏄鏂囦歡閫忔槑鍔犲瘑妯″潡錛屽瑰鉤甯稿姙鍏浣跨敤鏄娌℃湁褰卞搷鐨勩傝屼笖鏀鎸佷笌SVN絳夋簮浠g爜綆$悊宸ュ叿鏃犵紳緇撳悎銆

濡傛灉浼佷笟鍐呴儴SVN鏈嶅姟鍣ㄩ噰鍙栭忔槑妯″紡錛屽嵆鍔犲瘑鏂囦歡鏄鍙浠ュ瓨鏀懼湪SVN鏈嶅姟鍣ㄤ笂鐨勶紝闇瑕佽揪鍒扮殑鏁堟灉鏄瘲VN鏈嶅姟鍣ㄤ笂鏂囦歡瀵嗘枃瀛樺偍銆傚垯閰嶅悎搴旂敤鏈嶅姟鍣ㄥ畨鍏ㄦ帴鍏ョ郴緇熸潵瀹炵幇鍙鏈夊畨瑁呬簡鍔犲瘑瀹㈡埛絝鐨刉indows銆丩inux銆丮AC絝鎵嶈兘澶熸e父鐨勮塊棶鍏鍙稿唴閮ㄧ殑SVN鏈嶅姟鍣ㄣ

濡傛灉浼佷笟鍐呴儴閲囩敤eclipse銆乂S絳夊紑鍙戝伐鍏鳳紝浠庤繖浜涘紑鍙戝伐鍏峰皢浠g爜鐩存帴涓婁紶鍒癝VN鏈嶅姟鍣ㄤ笂鏃朵細鑷鍔ㄨВ瀵嗐備負浜嗛伩鍏嶆槑鏂囥佸瘑鏂囨販涔卞瓨鏀懼艱嚧鐗堟湰姣斿規椂鍑虹幇閿欒絳夐棶棰樸傚洜姝わ紝SVN鏈嶅姟鍣ㄤ笂闇緇熶竴瀛樻斁鏄庢枃鏂囦歡銆傚垯閫氳繃鏈嶅姟鍣ㄧ櫧鍚嶅崟鍔熻兘瀹炵幇瀵圭粓絝鐢佃剳鏁版嵁榪涜屽己鍒墮忔槑鍔犲瘑錛屽逛笂浼犲埌搴旂敤鏈嶅姟鍣ㄦ暟鎹瀹炵幇涓婁紶鑷鍔ㄨВ瀵嗐佷笅杞借嚜鍔ㄥ姞瀵嗐傚啀閰嶅悎搴旂敤鏈嶅姟鍣ㄥ畨鍏ㄦ帴鍏ョ郴緇熷疄鐜板彧鏈夊畨瑁呬簡鍔犲瘑瀹㈡埛絝鐨刉indows銆丩inux銆丮AC絝鎵嶈兘澶熸e父鐨勮塊棶鍏鍙稿唴閮ㄧ殑SVN鏈嶅姟鍣ㄣ

寰蜂漢鍚堢戞妧涓哄㈡埛鎻愪緵浼樿川鐨勫唴緗戝畨鍏ㄧ$悊浜у搧鍜岄傚悎澶氱嶈屼笟鐨勫簲鐢ㄨВ鍐蟲柟妗堛

❷ php生成PDF格式文件並且加密

本文給大家介紹的是如何使用php生成pdf文件,並且把該文件加密或設置訪問密碼的方法,有需要的小夥伴可以參考下。
項目需求:php生成pdf文件,並且把該文件加密或設置訪問密碼
開源的TCPDF是基於PHP的一套類庫,它能夠很好的生成PDF格式的文檔。並且支持文件加密,在目前的開源PHP框架、系統、應用中也使用得很廣。這里是設置PDF文檔的相關屬性的方法原型,其中就可以設置密碼
?
1
2
3
4
5
6
7
8
TCPDF::SetProtection
(
$permissions
=
array('print',
'modify',
'',
'annot-forms',
'fill-forms',
'extract',
'assemble',
'print-high'),
$user_pass
=
'',
$owner_pass
=
null,
$mode
=
0,
$pubkeys
=
null
)
通過SetProtection()方法設置後,生成的PDF文檔就是加密過的,在用戶打開PDF文檔的時候就會要求輸入訪問密碼

❸ 如何加密PHP文件

給文件加密,你可以在網路上下載超級加密3000 這是一款功能強大的文件和文回件夾加密和保護軟體。


超級答加密3000有超快和最強的文件、文件夾加密功能、數據保護功能,文件夾、文件的粉碎刪除以及文件夾偽裝等功能。


超級加密 3000採用先進的加密演算法,使你的文件和文件夾加密後,真正的達到超高的加密強度,讓你的加密數據無懈可擊。


超級加密3000還支持加密文件的臨時解密,文件加密後,雙擊加密文件,在彈出密碼輸入對話框輸入正確的密碼選擇確定,該加密文件就處於臨時解密,文件使用完畢退出以後,它自動恢復到加密狀態,無需再加密。


超級加密3000是一款不可多得的文件加密軟體,您可以到網路上搜索超級加密3000給您的文件加密試試看。


❹ 如何對PHP文件進行加密

對PHP文件進行加密,通常使用 Zend Guard,這是目前市面上應用比較多的PHP源碼加密產品。

加密流程大概如下:
1、打開Zend Guard 5.5.0,[File]->[New]->[Zend Guard Project],新建項目。
2、點擊 Next ,下一步。彈出如下對話框,選擇要進行加密的源文件或文件夾。

3、接下來是選擇PHP的版本[與你web伺服器上PHP的版本相對照],這里很重要,版本不對會出錯,[Finish]完成項目的創建。
4、在Zend Guard左側的Guard Explorer中,可以看到你新建的項目了,滑鼠選中項目名稱後,右鍵單擊[Encode Project],完成。

❺ php文件加密是干什麼的

加密自然是為了不讓別人修改,或者通過授權的方式去販賣等等。
php加密混淆的演算法,比如以下幾種:
PHP神盾
PHPJM
威盾
ByteRun
online
encoder
Php
Guard
Phppro
易盾PHP源碼加密
Zend
Guard加密
通過別人寫好的工具或者網站加密。

❻ php怎樣實現對zip文件的加密和解密

使用PHPZip類就可以解決的。以下是網上找到的例子。

$zipfiles=array("/root/pooy/test1.txt","/root/pooy/test2.txt");
$z=newPHPZip();
//$randomstr=random(8);
$zipfile=TEMP."/photocome_".$groupid.".zip";
$z->Zip($zipfiles,$zipfile);
<?php
#
#PHPZipv1.2bySext([email protected])2002-11-18
#(Changed:2003-03-01)
#
#Makesziparchive
#
#Basedon"Zipfilecreationclass",useszLib
#
#
classPHPZip
{
functionZip($dir,$zipfilename)
{
if(@function_exists('gzcompress'))
{
$curdir=getcwd();
if(is_array($dir))
{
$filelist=$dir;
}
else
{
$filelist=$this->GetFileList($dir);
}
if((!empty($dir))&&(!is_array($dir))&&(file_exists($dir)))chdir($dir);
elsechdir($curdir);
if(count($filelist)>0)
{
foreach($filelistas$filename)
{
if(is_file($filename))
{
$fd=fopen($filename,"r");
$content=fread($fd,filesize($filename));
fclose($fd);
if(is_array($dir))$filename=basename($filename);
$this->addFile($content,$filename);
}
}
$out=$this->file();
chdir($curdir);
$fp=fopen($zipfilename,"w");
fwrite($fp,$out,strlen($out));
fclose($fp);
}
return1;
}
elsereturn0;
}
functionGetFileList($dir)
{
if(file_exists($dir))
{
$args=func_get_args();
$pref=$args[1];
$dh=opendir($dir);
while($files=readdir($dh))
{
if(($files!=".")&&($files!=".."))
{
if(is_dir($dir.$files))
{
$curdir=getcwd();
chdir($dir.$files);
$file=array_merge($file,$this->GetFileList("","$pref$files/"));
chdir($curdir);
}
else$file[]=$pref.$files;
}
}
closedir($dh);
}
return$file;
}
var$datasec=array();
var$ctrl_dir=array();
var$eof_ctrl_dir="x50x4bx05x06x00x00x00x00";
var$old_offset=0;
/**
*(date
*inhightwobytes,).
*
*@
*
*@
*
*@accessprivate
*/
functionunix2DosTime($unixtime=0){
$timearray=($unixtime==0)?getdate():getdate($unixtime);
if($timearray['year']<1980){
$timearray['year']=1980;
$timearray['mon']=1;
$timearray['mday']=1;
$timearray['hours']=0;
$timearray['minutes']=0;
$timearray['seconds']=0;
}//endif
return(($timearray['year']-1980)<<25)|($timearray['mon']<<21)|($timearray['mday']<<16)|
($timearray['hours']<<11)|($timearray['minutes']<<5)|($timearray['seconds']>>1);
}//endofthe'unix2DosTime()'method
/**
*Adds"file"toarchive
*
*@paramstringfilecontents
*@(maycontainsthepath)
*@
*
*@accesspublic
*/
functionaddFile($data,$name,$time=0)
{
$name=str_replace('','/',$name);
$dtime=dechex($this->unix2DosTime($time));
$hexdtime='x'.$dtime[6].$dtime[7]
.'x'.$dtime[4].$dtime[5]
.'x'.$dtime[2].$dtime[3]
.'x'.$dtime[0].$dtime[1];
eval('$hexdtime="'.$hexdtime.'";');
$fr="x50x4bx03x04";
$fr.="x14x00";//verneededtoextract
$fr.="x00x00";//genpurposebitflag
$fr.="x08x00";//compressionmethod
$fr.=$hexdtime;//lastmodtimeanddate
//"localfileheader"segment
$unc_len=strlen($data);
$crc=crc32($data);
$zdata=gzcompress($data);
$c_len=strlen($zdata);
$zdata=substr(substr($zdata,0,strlen($zdata)-4),2);//fixcrcbug
$fr.=pack('V',$crc);//crc32
$fr.=pack('V',$c_len);//compressedfilesize
$fr.=pack('V',$unc_len);//uncompressedfilesize
$fr.=pack('v',strlen($name));//lengthoffilename
$fr.=pack('v',0);//extrafieldlength
$fr.=$name;
//"filedata"segment
$fr.=$zdata;
//"datadescriptor"segment(
//servedasfile)
$fr.=pack('V',$crc);//crc32
$fr.=pack('V',$c_len);//compressedfilesize
$fr.=pack('V',$unc_len);//uncompressedfilesize
//addthisentrytoarray
$this->datasec[]=$fr;
$new_offset=strlen(implode('',$this->datasec));
//
$cdrec="x50x4bx01x02";
$cdrec.="x00x00";//versionmadeby
$cdrec.="x14x00";//versionneededtoextract
$cdrec.="x00x00";//genpurposebitflag
$cdrec.="x08x00";//compressionmethod
$cdrec.=$hexdtime;//lastmodtime&date
$cdrec.=pack('V',$crc);//crc32
$cdrec.=pack('V',$c_len);//compressedfilesize
$cdrec.=pack('V',$unc_len);//uncompressedfilesize
$cdrec.=pack('v',strlen($name));//lengthoffilename
$cdrec.=pack('v',0);//extrafieldlength
$cdrec.=pack('v',0);//filecommentlength
$cdrec.=pack('v',0);//disknumberstart
$cdrec.=pack('v',0);//internalfileattributes
$cdrec.=pack('V',32);//externalfileattributes-'archive'bitset
$cdrec.=pack('V',$this->old_offset);//relativeoffsetoflocalheader
$this->old_offset=$new_offset;
$cdrec.=$name;
//optionalextrafield,filecommentgoeshere
//savetocentraldirectory
$this->ctrl_dir[]=$cdrec;
}//endofthe'addFile()'method
/**
*Dumpsoutfile
*
*@returnstringthezippedfile
*
*@accesspublic
*/
functionfile()
{
$data=implode('',$this->datasec);
$ctrldir=implode('',$this->ctrl_dir);
return
$data.
$ctrldir.
$this->eof_ctrl_dir.
pack('v',sizeof($this->ctrl_dir)).//total#ofentries"onthisdisk"
pack('v',sizeof($this->ctrl_dir)).//total#ofentriesoverall
pack('V',strlen($ctrldir)).//sizeofcentraldir
pack('V',strlen($data)).//offsettostartofcentraldir
"x00x00";//.zipfilecommentlength
}//endofthe'file()'method
}//endofthe'PHPZip'class
?>
閱讀全文

與自定義加密php文件相關的資料

熱點內容
ios12越獄插件文件夾路徑 瀏覽:717
把word重名文件替換了怎麼恢復 瀏覽:746
海爾a61筆記本bios清除密碼 瀏覽:953
獲取url參數js 瀏覽:862
linuxctrla 瀏覽:778
浪潮大數據一體機 瀏覽:487
qt識別當前所打開的文件夾路徑 瀏覽:320
iphone6plus日版港版 瀏覽:280
蘋果主屏移除的app在哪裡找 瀏覽:908
一般寄文件的快遞要多少錢 瀏覽:528
大數據是具有 瀏覽:871
廢紙箱文件夾 瀏覽:450
win10更新後c盤不足怎麼辦 瀏覽:402
excel重裝系統後打不開文件 瀏覽:981
報價文件包括的內容 瀏覽:627
手機設備添加列印文件格式 瀏覽:241
安卓的系統壁紙在哪個文件夾 瀏覽:331
iphone6s訂單截圖 瀏覽:874
machine怎麼編程 瀏覽:27
word插表格文件 瀏覽:264

友情鏈接