这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
zblogphp:development:functions:common [2020/05/18 22:51] zx.asd |
zblogphp:development:functions:common [2020/05/18 23:10] (当前版本) zx.asd |
||
---|---|---|---|
行 1: | 行 1: | ||
====== c_system_common 里全部函数列表 ====== | ====== c_system_common 里全部函数列表 ====== | ||
+ | |||
行 24: | 行 25: | ||
function GetScheme($array) | function GetScheme($array) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetWebServer() ==== | ==== GetWebServer() ==== | ||
行 42: | 行 45: | ||
function GetWebServer() | function GetWebServer() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetSystem() ==== | ==== GetSystem() ==== | ||
行 60: | 行 65: | ||
function GetSystem() | function GetSystem() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetPHPEngine() ==== | ==== GetPHPEngine() ==== | ||
行 78: | 行 85: | ||
function GetPHPEngine() | function GetPHPEngine() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetPHPVersion() ==== | ==== GetPHPVersion() ==== | ||
行 96: | 行 105: | ||
function GetPHPVersion() | function GetPHPVersion() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== AutoloadClass() ==== | ==== AutoloadClass() ==== | ||
行 117: | 行 128: | ||
function AutoloadClass($className) | function AutoloadClass($className) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Logs() ==== | ==== Logs() ==== | ||
行 139: | 行 152: | ||
*/ | */ | ||
} | } | ||
- | function Logs($logString$isError) | + | function Logs($logString,$isError) |
</code> | </code> | ||
+ | |||
+ | |||
==== RunTime() ==== | ==== RunTime() ==== | ||
行 162: | 行 177: | ||
function RunTime($isOutput) | function RunTime($isOutput) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetEnvironment() ==== | ==== GetEnvironment() ==== | ||
行 180: | 行 197: | ||
function GetEnvironment() | function GetEnvironment() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== plugin_dir_url() ==== | ==== plugin_dir_url() ==== | ||
行 201: | 行 220: | ||
function plugin_dir_url($file) | function plugin_dir_url($file) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== plugin_dir_path() ==== | ==== plugin_dir_path() ==== | ||
行 222: | 行 243: | ||
function plugin_dir_path($file) | function plugin_dir_path($file) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetValueInArray() ==== | ==== GetValueInArray() ==== | ||
行 244: | 行 267: | ||
*/ | */ | ||
} | } | ||
- | function GetValueInArray($array$name) | + | function GetValueInArray($array,$name) |
</code> | </code> | ||
+ | |||
+ | |||
==== GetValueInArrayByCurrent() ==== | ==== GetValueInArrayByCurrent() ==== | ||
行 268: | 行 293: | ||
*/ | */ | ||
} | } | ||
- | function GetValueInArrayByCurrent($array$name) | + | function GetValueInArrayByCurrent($array,$name) |
</code> | </code> | ||
+ | |||
+ | |||
==== SplitAndGet() ==== | ==== SplitAndGet() ==== | ||
行 295: | 行 322: | ||
*/ | */ | ||
} | } | ||
- | function SplitAndGet($string$delimiter$n) | + | function SplitAndGet($string,$delimiter,$n) |
</code> | </code> | ||
+ | |||
+ | |||
==== RemoveMoreSpaces() ==== | ==== RemoveMoreSpaces() ==== | ||
行 318: | 行 347: | ||
function RemoveMoreSpaces($s) | function RemoveMoreSpaces($s) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetGuid() ==== | ==== GetGuid() ==== | ||
行 336: | 行 367: | ||
function GetGuid() | function GetGuid() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetVars() ==== | ==== GetVars() ==== | ||
行 358: | 行 391: | ||
*/ | */ | ||
} | } | ||
- | function GetVars($name$type) | + | function GetVars($name,$type) |
</code> | </code> | ||
+ | |||
+ | |||
==== GetVarsByDefault() ==== | ==== GetVarsByDefault() ==== | ||
行 385: | 行 420: | ||
*/ | */ | ||
} | } | ||
- | function GetVarsByDefault($name$type$default) | + | function GetVarsByDefault($name,$type,$default) |
</code> | </code> | ||
+ | |||
+ | |||
==== GetDbName() ==== | ==== GetDbName() ==== | ||
行 405: | 行 442: | ||
function GetDbName() | function GetDbName() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetCurrentHost() ==== | ==== GetCurrentHost() ==== | ||
行 427: | 行 466: | ||
*/ | */ | ||
} | } | ||
- | function GetCurrentHost($blogpath$cookiesPath) | + | function GetCurrentHost($blogpath,$cookiesPath) |
</code> | </code> | ||
+ | |||
+ | |||
==== GetHttpContent() ==== | ==== GetHttpContent() ==== | ||
行 450: | 行 491: | ||
function GetHttpContent($url) | function GetHttpContent($url) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetDirsInDir() ==== | ==== GetDirsInDir() ==== | ||
行 471: | 行 514: | ||
function GetDirsInDir($dir) | function GetDirsInDir($dir) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetFilesInDir() ==== | ==== GetFilesInDir() ==== | ||
行 493: | 行 538: | ||
*/ | */ | ||
} | } | ||
- | function GetFilesInDir($dir$type) | + | function GetFilesInDir($dir,$type) |
</code> | </code> | ||
+ | |||
+ | |||
==== RedirectByScript() ==== | ==== RedirectByScript() ==== | ||
行 514: | 行 561: | ||
function RedirectByScript($url) | function RedirectByScript($url) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Redirect() ==== | ==== Redirect() ==== | ||
行 533: | 行 582: | ||
function Redirect($url) | function Redirect($url) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Redirect301() ==== | ==== Redirect301() ==== | ||
行 552: | 行 603: | ||
function Redirect301($url) | function Redirect301($url) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Http404() ==== | ==== Http404() ==== | ||
行 568: | 行 621: | ||
function Http404() | function Http404() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Http500() ==== | ==== Http500() ==== | ||
行 584: | 行 639: | ||
function Http500() | function Http500() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Http503() ==== | ==== Http503() ==== | ||
行 600: | 行 657: | ||
function Http503() | function Http503() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Http304() ==== | ==== Http304() ==== | ||
行 620: | 行 679: | ||
*/ | */ | ||
} | } | ||
- | function Http304($filename$time) | + | function Http304($filename,$time) |
</code> | </code> | ||
+ | |||
+ | |||
==== GetGuestIP() ==== | ==== GetGuestIP() ==== | ||
行 640: | 行 701: | ||
function GetGuestIP() | function GetGuestIP() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetGuestAgent() ==== | ==== GetGuestAgent() ==== | ||
行 658: | 行 721: | ||
function GetGuestAgent() | function GetGuestAgent() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetRequestUri() ==== | ==== GetRequestUri() ==== | ||
行 676: | 行 741: | ||
function GetRequestUri() | function GetRequestUri() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetFileExt() ==== | ==== GetFileExt() ==== | ||
行 697: | 行 764: | ||
function GetFileExt($f) | function GetFileExt($f) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetFilePermsOct() ==== | ==== GetFilePermsOct() ==== | ||
行 718: | 行 787: | ||
function GetFilePermsOct($f) | function GetFilePermsOct($f) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetFilePerms() ==== | ==== GetFilePerms() ==== | ||
行 739: | 行 810: | ||
function GetFilePerms($f) | function GetFilePerms($f) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== AddNameInString() ==== | ==== AddNameInString() ==== | ||
行 761: | 行 834: | ||
*/ | */ | ||
} | } | ||
- | function AddNameInString($s$name) | + | function AddNameInString($s,$name) |
</code> | </code> | ||
+ | |||
+ | |||
==== DelNameInString() ==== | ==== DelNameInString() ==== | ||
行 785: | 行 860: | ||
*/ | */ | ||
} | } | ||
- | function DelNameInString($s$name) | + | function DelNameInString($s,$name) |
</code> | </code> | ||
+ | |||
+ | |||
==== HasNameInString() ==== | ==== HasNameInString() ==== | ||
行 809: | 行 886: | ||
*/ | */ | ||
} | } | ||
- | function HasNameInString($s$name) | + | function HasNameInString($s,$name) |
</code> | </code> | ||
+ | |||
+ | |||
==== JsonError4ShowErrorHook() ==== | ==== JsonError4ShowErrorHook() ==== | ||
行 837: | 行 916: | ||
*/ | */ | ||
} | } | ||
- | function JsonError4ShowErrorHook($errorCode$errorString$file$line) | + | function JsonError4ShowErrorHook($errorCode,$errorString,$file,$line) |
</code> | </code> | ||
+ | |||
+ | |||
==== JsonError() ==== | ==== JsonError() ==== | ||
行 862: | 行 943: | ||
*/ | */ | ||
} | } | ||
- | function JsonError($errorCode$errorString$data) | + | function JsonError($errorCode,$errorString,$data) |
</code> | </code> | ||
+ | |||
+ | |||
==== JsonReturn() ==== | ==== JsonReturn() ==== | ||
行 883: | 行 966: | ||
function JsonReturn($data) | function JsonReturn($data) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== RespondError() ==== | ==== RespondError() ==== | ||
行 911: | 行 996: | ||
*/ | */ | ||
} | } | ||
- | function RespondError($errorCode$errorString$file$line) | + | function RespondError($errorCode,$errorString,$file,$line) |
</code> | </code> | ||
+ | |||
+ | |||
==== ScriptError() ==== | ==== ScriptError() ==== | ||
行 941: | 行 1028: | ||
*/ | */ | ||
} | } | ||
- | function ScriptError($errorCode$errorText$file$line) | + | function ScriptError($errorCode,$errorText,$file,$line) |
</code> | </code> | ||
+ | |||
+ | |||
==== CheckRegExp() ==== | ==== CheckRegExp() ==== | ||
行 965: | 行 1054: | ||
*/ | */ | ||
} | } | ||
- | function CheckRegExp($source$para) | + | function CheckRegExp($source,$para) |
</code> | </code> | ||
+ | |||
+ | |||
==== FormatString() ==== | ==== FormatString() ==== | ||
行 989: | 行 1080: | ||
*/ | */ | ||
} | } | ||
- | function FormatString($source$para) | + | function FormatString($source,$para) |
</code> | </code> | ||
+ | |||
+ | |||
==== TransferHTML() ==== | ==== TransferHTML() ==== | ||
行 1011: | 行 1104: | ||
*/ | */ | ||
} | } | ||
- | function TransferHTML($source$param) | + | function TransferHTML($source,$param) |
</code> | </code> | ||
+ | |||
+ | |||
==== CloseTags() ==== | ==== CloseTags() ==== | ||
行 1034: | 行 1129: | ||
function CloseTags($html) | function CloseTags($html) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== SubStrUTF8_Start() ==== | ==== SubStrUTF8_Start() ==== | ||
行 1056: | 行 1153: | ||
*/ | */ | ||
} | } | ||
- | function SubStrUTF8_Start($sourcestr$start) | + | function SubStrUTF8_Start($sourcestr,$start) |
</code> | </code> | ||
+ | |||
+ | |||
==== SubStrUTF8() ==== | ==== SubStrUTF8() ==== | ||
行 1080: | 行 1179: | ||
*/ | */ | ||
} | } | ||
- | function SubStrUTF8($sourcestr$cutlength) | + | function SubStrUTF8($sourcestr,$cutlength) |
</code> | </code> | ||
+ | |||
+ | |||
==== Zbp_SubStr() ==== | ==== Zbp_SubStr() ==== | ||
行 1104: | 行 1205: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_SubStr($sourcestr$start) | + | function Zbp_SubStr($sourcestr,$start) |
</code> | </code> | ||
+ | |||
+ | |||
==== Zbp_StrLen() ==== | ==== Zbp_StrLen() ==== | ||
行 1127: | 行 1230: | ||
function Zbp_StrLen($string) | function Zbp_StrLen($string) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Zbp_Strpos() ==== | ==== Zbp_Strpos() ==== | ||
行 1152: | 行 1257: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_Strpos($haystack$needle$offset) | + | function Zbp_Strpos($haystack,$needle,$offset) |
</code> | </code> | ||
+ | |||
+ | |||
==== Zbp_Stripos() ==== | ==== Zbp_Stripos() ==== | ||
行 1179: | 行 1286: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_Stripos($haystack$needle$offset) | + | function Zbp_Stripos($haystack,$needle,$offset) |
</code> | </code> | ||
+ | |||
+ | |||
==== SubStrUTF8_Html() ==== | ==== SubStrUTF8_Html() ==== | ||
行 1203: | 行 1312: | ||
*/ | */ | ||
} | } | ||
- | function SubStrUTF8_Html($source$length) | + | function SubStrUTF8_Html($source,$length) |
</code> | </code> | ||
+ | |||
+ | |||
==== RemoveBOM() ==== | ==== RemoveBOM() ==== | ||
行 1226: | 行 1337: | ||
function RemoveBOM($s) | function RemoveBOM($s) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetTimeZoneByGMT() ==== | ==== GetTimeZoneByGMT() ==== | ||
行 1247: | 行 1360: | ||
function GetTimeZoneByGMT($z) | function GetTimeZoneByGMT($z) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== htmlspecialchars_array() ==== | ==== htmlspecialchars_array() ==== | ||
行 1268: | 行 1383: | ||
function htmlspecialchars_array($array) | function htmlspecialchars_array($array) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== FilterCorrectName() ==== | ==== FilterCorrectName() ==== | ||
行 1289: | 行 1406: | ||
function FilterCorrectName($s) | function FilterCorrectName($s) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== CheckCanBeString() ==== | ==== CheckCanBeString() ==== | ||
行 1310: | 行 1429: | ||
function CheckCanBeString($obj) | function CheckCanBeString($obj) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== BuildSafeURL() ==== | ==== BuildSafeURL() ==== | ||
行 1332: | 行 1453: | ||
*/ | */ | ||
} | } | ||
- | function BuildSafeURL($url$appId) | + | function BuildSafeURL($url,$appId) |
</code> | </code> | ||
+ | |||
+ | |||
==== BuildSafeCmdURL() ==== | ==== BuildSafeCmdURL() ==== | ||
行 1355: | 行 1478: | ||
function BuildSafeCmdURL($paramters) | function BuildSafeCmdURL($paramters) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== utf84mb_filter() ==== | ==== utf84mb_filter() ==== | ||
行 1376: | 行 1501: | ||
function utf84mb_filter($sql) | function utf84mb_filter($sql) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== utf84mb_fixHtmlSpecialChars() ==== | ==== utf84mb_fixHtmlSpecialChars() ==== | ||
行 1394: | 行 1521: | ||
function utf84mb_fixHtmlSpecialChars() | function utf84mb_fixHtmlSpecialChars() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== utf84mb_convertToUCS4() ==== | ==== utf84mb_convertToUCS4() ==== | ||
行 1415: | 行 1544: | ||
function utf84mb_convertToUCS4($matches) | function utf84mb_convertToUCS4($matches) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== utf84mb_convertToUTF8() ==== | ==== utf84mb_convertToUTF8() ==== | ||
行 1436: | 行 1567: | ||
function utf84mb_convertToUTF8($matches) | function utf84mb_convertToUTF8($matches) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== VerifyWebToken() ==== | ==== VerifyWebToken() ==== | ||
行 1461: | 行 1594: | ||
*/ | */ | ||
} | } | ||
- | function VerifyWebToken($webTokenString$webTokenId$key) | + | function VerifyWebToken($webTokenString,$webTokenId,$key) |
</code> | </code> | ||
+ | |||
+ | |||
==== CreateWebToken() ==== | ==== CreateWebToken() ==== | ||
行 1488: | 行 1623: | ||
*/ | */ | ||
} | } | ||
- | function CreateWebToken($webTokenId$time$key) | + | function CreateWebToken($webTokenId,$time,$key) |
</code> | </code> | ||
+ | |||
+ | |||
==== CheckIsRefererValid() ==== | ==== CheckIsRefererValid() ==== | ||
行 1506: | 行 1643: | ||
function CheckIsRefererValid() | function CheckIsRefererValid() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== CheckCSRFTokenValid() ==== | ==== CheckCSRFTokenValid() ==== | ||
行 1528: | 行 1667: | ||
*/ | */ | ||
} | } | ||
- | function CheckCSRFTokenValid($fieldName$methods) | + | function CheckCSRFTokenValid($fieldName,$methods) |
</code> | </code> | ||
+ | |||
+ | |||
==== CheckHTTPRefererValid() ==== | ==== CheckHTTPRefererValid() ==== | ||
行 1548: | 行 1689: | ||
function CheckHTTPRefererValid() | function CheckHTTPRefererValid() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== RemovePHPCode() ==== | ==== RemovePHPCode() ==== | ||
行 1569: | 行 1712: | ||
function RemovePHPCode($code) | function RemovePHPCode($code) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== GetIDArrayByList() ==== | ==== GetIDArrayByList() ==== | ||
行 1591: | 行 1736: | ||
*/ | */ | ||
} | } | ||
- | function GetIDArrayByList($array$keyname) | + | function GetIDArrayByList($array,$keyname) |
</code> | </code> | ||
+ | |||
+ | |||
==== GetBackendCSPHeader() ==== | ==== GetBackendCSPHeader() ==== | ||
行 1611: | 行 1758: | ||
function GetBackendCSPHeader() | function GetBackendCSPHeader() | ||
</code> | </code> | ||
+ | |||
+ | |||
==== CheckIncludedFiles() ==== | ==== CheckIncludedFiles() ==== | ||
行 1632: | 行 1781: | ||
function CheckIncludedFiles($file) | function CheckIncludedFiles($file) | ||
</code> | </code> | ||
+ | |||
+ | |||
==== Logs_Dump() ==== | ==== Logs_Dump() ==== | ||
行 1648: | 行 1799: | ||
function Logs_Dump() | function Logs_Dump() | ||
</code> | </code> | ||
+ | |||
+ |