packphp
❶ php pack函數能看到源碼嗎
如果是字元串的話應該是string類型,對應的是a或者A。可以這樣pack('a*',$data1).pack('a*',$data2),當然我只是提個建議,你那種寫在一個pack函數裡面的我沒用過,所以你可以自己驗證一下,但是分著寫是肯定沒問題。如果你想優化的話,可以使用strlen()函數,看一下你的data到底有多長,就沒必要使用a*或者是h*了。
❷ PHP對pack後的二進制數據怎麼進行位運算
沒用過這里, 翻翻手冊看看吧
❸ php中的pack:type h:illegal hex digit x怎麼解決
^The h format code specifies input as a hex string. It's hard to tell this from the error, but the -between the words digit and line is literally the character that is causing the error (i.e. it's not a separator in the message).
PHP Warning: pack(): Type h: illegal hex digit - line 37
^
In other words, your input is interpreted as a string containing the - character, which is not a legal hex digit (0123456789abcdef).
It's hard to give any specific advice on solving your problem without more information. At the very least, you need to review PHP's implementation of pack.
❹ php程序中pack('I', strlen($data))什麼意思
將就使用chr(len(data))吧,有一點區別,PHP這個語句使用的是無符號整數,但是ASP好像沒有有符號、無符號的概念。
❺ php pack("N", 280) asp如何寫
PHP pack() 函數
PHP 雜項函數
定義和用法
pack() 函數把數據裝入一個二進制字元串。
語法
pack(format,args+)
參數 描述
format 必需。規定在包裝數據時所使用的格式。
args+ 可選。規定被包裝的一個或多個參數。
format 參數的可能值:
a - NUL-padded string
A - SPACE-padded string
h - Hex string, low nibble first
H - Hex string, high nibble first
c - signed char
C - unsigned char
s - signed short (always 16 bit, machine byte order)
S - unsigned short (always 16 bit, machine byte order)
n - unsigned short (always 16 bit, big endian byte order)
v - unsigned short (always 16 bit, little endian byte order)
i - signed integer (machine dependent size and byte order)
I - unsigned integer (machine dependent size and byte order)
l - signed long (always 32 bit, machine byte order)
……
❻ packdown.php是什麼意思
雖然抄一樓回答得對,但我認為樓主的問題在於下載的文件變成了php文件
第一,樓主,php文件裡面是頁面和功能代碼,和你要下載的文件無關
第二,這代表你下載沒成功
解決辦法:
你下載的文件的網站設置了防盜鏈或下載的文件已經刪除,實際下載的只是一個頁面文件。你可以嘗試在瀏覽器里右擊鏈接,選擇「目標另存為」,用瀏覽器來下載 ,雖然速度可能慢點,但一般都可以下載,如果連這樣下載都不支持,那就真沒法下載了。
當然你也可以取消訊雷作為默認下載工具,改為用瀏覽器下載,開迅雷,在配置裡面的監控選項里把監控瀏覽器取消,再下載就OK了
======================================
再就你本身的問題回答下
packdown指包下載
php是一種web開發語言/環境,.php是它的網頁\腳本文件後綴名。
packdown.php這個名字通常是下載或交互頁面的名字
❼ php pack 用c#怎麼轉換
php 的 pack("H*", sha1($api_password))
實際就抄是 sha1($api_password, true)
即只返回二進襲制數據
你在用 C# 寫 sha1 函數時也不要轉換成十六進製表示,而直接返回 byte 數組就可以
C# 在做這類操作時,都是要將字元串轉成 byte 數組後才可以的
❽ 在x86平台上php的pack函數如何構造大端(網路序)32位的有符號整數
<?php//>=5.2.0
functionpackInt32be($i){
if($i<-2147483648||$i>2147483647)
die("Outofbounds");
returnpack('C4',
($i>>24)&0xFF,
($i>>16)&0xFF,
($i>>8)&0xFF,
($i>>0)&0xFF
);
}
functionunpackInt32be($p){
if(ord($p[0])>>7)
return-((~(
((ord($p[0])&0x7f)<<24)
+(ord($p[1])<<16)
+(ord($p[2])<<8)+ord($p[3]))
&0x7fffffff)+1);
elsereturn
(ord($p[0])<<24)
+(ord($p[1])<<16)
+(ord($p[2])<<8)+ord($p[3]);
}
functiontestPacking($a){
$p=packInt32be($a);
$d=unpackInt32be($p);
echo$a.'->'.bin2hex($p).'->'.$d.'<br/>';
}
$a=array(-1,-2147483648,0x12345678,65535,-65535);
foreach($aas$e)testPacking($e);
沒有預置的,只好手寫了一套編碼解碼了
html">原整數->編碼後位元組->解碼後整數
-1->ffffffff->-1
-2147483648->80000000->-2147483648
305419896->12345678->305419896
65535->0000ffff->65535
-65535->ffff0001->-65535
❾ php debug pack 怎麼用
對於復使用者而言,這個制 php debug pack 是毫無意義的
這個包是提供給開發人員的,如果你會 C++ 那麼你就應該知道,C++工程產生的文件都保存於 debug 目錄中的
雖然 php 是開源的,但他的核心代碼並不開源的,而是以 lib 形式提供給開發者的
❿ php pack函數
$num = array( 'value'=>'54','type'=>'i1');
pack(strtolower($data['type']), trim($data['value']));
最好使用英文名稱,pack會根據數據類型對你的數據進行打包,數據類型是有有格式的,給你個參考網站
http://www.w3school.com.cn/php/func_misc_pack.asp
如果你要是多個數據傳一起發送的話,可以定義一個大點的數組,使用foreach()函數對數組進行遍歷,在組成一個長的字元串。如果還有不明白的可以繼續問我