grep php來源爲php_stream_open_wrapper_ex
調用,這應該給PHP_FUNCTION
s直接與包裝進行交互。
粗糙,可能有部分錯誤列表(-B 100
不準確):
$ find . -name '*.c'| xargs grep -B 100 php_stream_open_wrapper_ex| grep PHP_FUNCTION
./ext/standard/url.c-PHP_FUNCTION(rawurlencode)
./ext/standard/url.c-PHP_FUNCTION(rawurldecode)
./ext/standard/url.c-PHP_FUNCTION(get_headers)
./ext/standard/file.c-PHP_FUNCTION(file_get_contents)
./ext/standard/file.c-PHP_FUNCTION(file_put_contents)
./ext/standard/file.c-PHP_FUNCTION(file)
./ext/standard/file.c-PHP_FUNCTION(tempnam)
./ext/standard/file.c-PHP_FUNCTION(mkdir)
./ext/standard/file.c-PHP_FUNCTION(rmdir)
./ext/standard/file.c-PHP_FUNCTION(readfile)
./ext/oci8/oci8_interface.c-PHP_FUNCTION(oci_lob_export)
./ext/hash/hash.c-PHP_FUNCTION(hash)
./ext/hash/hash.c-PHP_FUNCTION(hash_file)
./ext/hash/hash.c-PHP_FUNCTION(hash_update)
./ext/hash/hash.c-PHP_FUNCTION(hash_update_stream)
./ext/hash/hash.c-PHP_FUNCTION(hash_update_file)
@ninuhadida - 名單很可能會相當長。我可以想到「include」,「require」,「require_once」,「include_once」,「readfile」,「file」,「virtual」,「imagecreatefrom ...」,「DomDocument :: loadXMLFile」,「 Dom :: Document :: loadHTMLFile「等。所以許多函數依賴於文件名/ url的使用。 **這裏真正的問題是爲什麼你想要一個完整的列表** – 2011-06-14 15:34:33
創建這樣的列表幾乎是不可能的,因爲幾乎每個支持文件名的函數/方法都支持流封裝,包括擴展中的那些。你不能使用包裝器對所有函數「grep」,因爲這些URL可能是表達式或變量的結果。你可以做的最好的辦法是對目錄中的所有URL進行grep處理。 – netcoder 2011-06-14 15:42:42
@Francois - 一些包裝已經改變了功能,例如。/dev/stdin需要更改爲php:// stdin。只要我有一個函數列表,我可以用grep和其他工具處理它。 – 2011-06-14 15:43:33