这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 上一修订版 两侧同时换到之后的修订记录 | ||
zblogphp:development:functions:common [2020/05/18 22:50] zx.asd |
zblogphp:development:functions:common [2020/05/18 22:55] zx.asd |
||
---|---|---|---|
行 1: | 行 1: | ||
====== c_system_common 里全部函数列表 ====== | ====== c_system_common 里全部函数列表 ====== | ||
+ | |||
+ | |||
行 21: | 行 23: | ||
*/ | */ | ||
} | } | ||
- | function GetScheme() | + | function GetScheme($array) |
</code> | </code> | ||
==== GetWebServer() ==== | ==== GetWebServer() ==== | ||
行 114: | 行 116: | ||
*/ | */ | ||
} | } | ||
- | function AutoloadClass() | + | function AutoloadClass($className) |
</code> | </code> | ||
==== Logs() ==== | ==== Logs() ==== | ||
行 138: | 行 140: | ||
*/ | */ | ||
} | } | ||
- | function Logs() | + | function Logs($logString,$isError) |
</code> | </code> | ||
==== RunTime() ==== | ==== RunTime() ==== | ||
行 159: | 行 161: | ||
*/ | */ | ||
} | } | ||
- | function RunTime() | + | function RunTime($isOutput) |
</code> | </code> | ||
==== GetEnvironment() ==== | ==== GetEnvironment() ==== | ||
行 198: | 行 200: | ||
*/ | */ | ||
} | } | ||
- | function plugin_dir_url() | + | function plugin_dir_url($file) |
</code> | </code> | ||
==== plugin_dir_path() ==== | ==== plugin_dir_path() ==== | ||
行 219: | 行 221: | ||
*/ | */ | ||
} | } | ||
- | function plugin_dir_path() | + | function plugin_dir_path($file) |
</code> | </code> | ||
==== GetValueInArray() ==== | ==== GetValueInArray() ==== | ||
行 243: | 行 245: | ||
*/ | */ | ||
} | } | ||
- | function GetValueInArray() | + | function GetValueInArray($array,$name) |
</code> | </code> | ||
==== GetValueInArrayByCurrent() ==== | ==== GetValueInArrayByCurrent() ==== | ||
行 267: | 行 269: | ||
*/ | */ | ||
} | } | ||
- | function GetValueInArrayByCurrent() | + | function GetValueInArrayByCurrent($array,$name) |
</code> | </code> | ||
==== SplitAndGet() ==== | ==== SplitAndGet() ==== | ||
行 294: | 行 296: | ||
*/ | */ | ||
} | } | ||
- | function SplitAndGet() | + | function SplitAndGet($string,$delimiter,$n) |
</code> | </code> | ||
==== RemoveMoreSpaces() ==== | ==== RemoveMoreSpaces() ==== | ||
行 315: | 行 317: | ||
*/ | */ | ||
} | } | ||
- | function RemoveMoreSpaces() | + | function RemoveMoreSpaces($s) |
</code> | </code> | ||
==== GetGuid() ==== | ==== GetGuid() ==== | ||
行 357: | 行 359: | ||
*/ | */ | ||
} | } | ||
- | function GetVars() | + | function GetVars($name,$type) |
</code> | </code> | ||
==== GetVarsByDefault() ==== | ==== GetVarsByDefault() ==== | ||
行 384: | 行 386: | ||
*/ | */ | ||
} | } | ||
- | function GetVarsByDefault() | + | function GetVarsByDefault($name,$type,$default) |
</code> | </code> | ||
==== GetDbName() ==== | ==== GetDbName() ==== | ||
行 426: | 行 428: | ||
*/ | */ | ||
} | } | ||
- | function GetCurrentHost() | + | function GetCurrentHost($blogpath,$cookiesPath) |
</code> | </code> | ||
==== GetHttpContent() ==== | ==== GetHttpContent() ==== | ||
行 447: | 行 449: | ||
*/ | */ | ||
} | } | ||
- | function GetHttpContent() | + | function GetHttpContent($url) |
</code> | </code> | ||
==== GetDirsInDir() ==== | ==== GetDirsInDir() ==== | ||
行 468: | 行 470: | ||
*/ | */ | ||
} | } | ||
- | function GetDirsInDir() | + | function GetDirsInDir($dir) |
</code> | </code> | ||
==== GetFilesInDir() ==== | ==== GetFilesInDir() ==== | ||
行 492: | 行 494: | ||
*/ | */ | ||
} | } | ||
- | function GetFilesInDir() | + | function GetFilesInDir($dir,$type) |
</code> | </code> | ||
==== RedirectByScript() ==== | ==== RedirectByScript() ==== | ||
行 511: | 行 513: | ||
*/ | */ | ||
} | } | ||
- | function RedirectByScript() | + | function RedirectByScript($url) |
</code> | </code> | ||
==== Redirect() ==== | ==== Redirect() ==== | ||
行 530: | 行 532: | ||
*/ | */ | ||
} | } | ||
- | function Redirect() | + | function Redirect($url) |
</code> | </code> | ||
==== Redirect301() ==== | ==== Redirect301() ==== | ||
行 549: | 行 551: | ||
*/ | */ | ||
} | } | ||
- | function Redirect301() | + | function Redirect301($url) |
</code> | </code> | ||
==== Http404() ==== | ==== Http404() ==== | ||
行 619: | 行 621: | ||
*/ | */ | ||
} | } | ||
- | function Http304() | + | function Http304($filename,$time) |
</code> | </code> | ||
==== GetGuestIP() ==== | ==== GetGuestIP() ==== | ||
行 694: | 行 696: | ||
*/ | */ | ||
} | } | ||
- | function GetFileExt() | + | function GetFileExt($f) |
</code> | </code> | ||
==== GetFilePermsOct() ==== | ==== GetFilePermsOct() ==== | ||
行 715: | 行 717: | ||
*/ | */ | ||
} | } | ||
- | function GetFilePermsOct() | + | function GetFilePermsOct($f) |
</code> | </code> | ||
==== GetFilePerms() ==== | ==== GetFilePerms() ==== | ||
行 736: | 行 738: | ||
*/ | */ | ||
} | } | ||
- | function GetFilePerms() | + | function GetFilePerms($f) |
</code> | </code> | ||
==== AddNameInString() ==== | ==== AddNameInString() ==== | ||
行 760: | 行 762: | ||
*/ | */ | ||
} | } | ||
- | function AddNameInString() | + | function AddNameInString($s,$name) |
</code> | </code> | ||
==== DelNameInString() ==== | ==== DelNameInString() ==== | ||
行 784: | 行 786: | ||
*/ | */ | ||
} | } | ||
- | function DelNameInString() | + | function DelNameInString($s,$name) |
</code> | </code> | ||
==== HasNameInString() ==== | ==== HasNameInString() ==== | ||
行 808: | 行 810: | ||
*/ | */ | ||
} | } | ||
- | function HasNameInString() | + | function HasNameInString($s,$name) |
</code> | </code> | ||
==== JsonError4ShowErrorHook() ==== | ==== JsonError4ShowErrorHook() ==== | ||
行 836: | 行 838: | ||
*/ | */ | ||
} | } | ||
- | function JsonError4ShowErrorHook() | + | function JsonError4ShowErrorHook($errorCode,$errorString,$file,$line) |
</code> | </code> | ||
==== JsonError() ==== | ==== JsonError() ==== | ||
行 861: | 行 863: | ||
*/ | */ | ||
} | } | ||
- | function JsonError() | + | function JsonError($errorCode,$errorString,$data) |
</code> | </code> | ||
==== JsonReturn() ==== | ==== JsonReturn() ==== | ||
行 880: | 行 882: | ||
*/ | */ | ||
} | } | ||
- | function JsonReturn() | + | function JsonReturn($data) |
</code> | </code> | ||
==== RespondError() ==== | ==== RespondError() ==== | ||
行 910: | 行 912: | ||
*/ | */ | ||
} | } | ||
- | function RespondError() | + | function RespondError($errorCode,$errorString,$file,$line) |
</code> | </code> | ||
==== ScriptError() ==== | ==== ScriptError() ==== | ||
行 940: | 行 942: | ||
*/ | */ | ||
} | } | ||
- | function ScriptError() | + | function ScriptError($errorCode,$errorText,$file,$line) |
</code> | </code> | ||
==== CheckRegExp() ==== | ==== CheckRegExp() ==== | ||
行 964: | 行 966: | ||
*/ | */ | ||
} | } | ||
- | function CheckRegExp() | + | function CheckRegExp($source,$para) |
</code> | </code> | ||
==== FormatString() ==== | ==== FormatString() ==== | ||
行 988: | 行 990: | ||
*/ | */ | ||
} | } | ||
- | function FormatString() | + | function FormatString($source,$para) |
</code> | </code> | ||
==== TransferHTML() ==== | ==== TransferHTML() ==== | ||
行 1010: | 行 1012: | ||
*/ | */ | ||
} | } | ||
- | function TransferHTML() | + | function TransferHTML($source,$param) |
</code> | </code> | ||
==== CloseTags() ==== | ==== CloseTags() ==== | ||
行 1031: | 行 1033: | ||
*/ | */ | ||
} | } | ||
- | function CloseTags() | + | function CloseTags($html) |
</code> | </code> | ||
==== SubStrUTF8_Start() ==== | ==== SubStrUTF8_Start() ==== | ||
行 1055: | 行 1057: | ||
*/ | */ | ||
} | } | ||
- | function SubStrUTF8_Start() | + | function SubStrUTF8_Start($sourcestr,$start) |
</code> | </code> | ||
==== SubStrUTF8() ==== | ==== SubStrUTF8() ==== | ||
行 1079: | 行 1081: | ||
*/ | */ | ||
} | } | ||
- | function SubStrUTF8() | + | function SubStrUTF8($sourcestr,$cutlength) |
</code> | </code> | ||
==== Zbp_SubStr() ==== | ==== Zbp_SubStr() ==== | ||
行 1103: | 行 1105: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_SubStr() | + | function Zbp_SubStr($sourcestr,$start) |
</code> | </code> | ||
==== Zbp_StrLen() ==== | ==== Zbp_StrLen() ==== | ||
行 1124: | 行 1126: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_StrLen() | + | function Zbp_StrLen($string) |
</code> | </code> | ||
==== Zbp_Strpos() ==== | ==== Zbp_Strpos() ==== | ||
行 1151: | 行 1153: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_Strpos() | + | function Zbp_Strpos($haystack,$needle,$offset) |
</code> | </code> | ||
==== Zbp_Stripos() ==== | ==== Zbp_Stripos() ==== | ||
行 1178: | 行 1180: | ||
*/ | */ | ||
} | } | ||
- | function Zbp_Stripos() | + | function Zbp_Stripos($haystack,$needle,$offset) |
</code> | </code> | ||
==== SubStrUTF8_Html() ==== | ==== SubStrUTF8_Html() ==== | ||
行 1202: | 行 1204: | ||
*/ | */ | ||
} | } | ||
- | function SubStrUTF8_Html() | + | function SubStrUTF8_Html($source,$length) |
</code> | </code> | ||
==== RemoveBOM() ==== | ==== RemoveBOM() ==== | ||
行 1223: | 行 1225: | ||
*/ | */ | ||
} | } | ||
- | function RemoveBOM() | + | function RemoveBOM($s) |
</code> | </code> | ||
==== GetTimeZoneByGMT() ==== | ==== GetTimeZoneByGMT() ==== | ||
行 1244: | 行 1246: | ||
*/ | */ | ||
} | } | ||
- | function GetTimeZoneByGMT() | + | function GetTimeZoneByGMT($z) |
</code> | </code> | ||
==== htmlspecialchars_array() ==== | ==== htmlspecialchars_array() ==== | ||
行 1265: | 行 1267: | ||
*/ | */ | ||
} | } | ||
- | function htmlspecialchars_array() | + | function htmlspecialchars_array($array) |
</code> | </code> | ||
==== FilterCorrectName() ==== | ==== FilterCorrectName() ==== | ||
行 1286: | 行 1288: | ||
*/ | */ | ||
} | } | ||
- | function FilterCorrectName() | + | function FilterCorrectName($s) |
</code> | </code> | ||
==== CheckCanBeString() ==== | ==== CheckCanBeString() ==== | ||
行 1307: | 行 1309: | ||
*/ | */ | ||
} | } | ||
- | function CheckCanBeString() | + | function CheckCanBeString($obj) |
</code> | </code> | ||
==== BuildSafeURL() ==== | ==== BuildSafeURL() ==== | ||
行 1331: | 行 1333: | ||
*/ | */ | ||
} | } | ||
- | function BuildSafeURL() | + | function BuildSafeURL($url,$appId) |
</code> | </code> | ||
==== BuildSafeCmdURL() ==== | ==== BuildSafeCmdURL() ==== | ||
行 1352: | 行 1354: | ||
*/ | */ | ||
} | } | ||
- | function BuildSafeCmdURL() | + | function BuildSafeCmdURL($paramters) |
</code> | </code> | ||
==== utf84mb_filter() ==== | ==== utf84mb_filter() ==== | ||
行 1373: | 行 1375: | ||
*/ | */ | ||
} | } | ||
- | function utf84mb_filter() | + | function utf84mb_filter($sql) |
</code> | </code> | ||
==== utf84mb_fixHtmlSpecialChars() ==== | ==== utf84mb_fixHtmlSpecialChars() ==== | ||
行 1412: | 行 1414: | ||
*/ | */ | ||
} | } | ||
- | function utf84mb_convertToUCS4() | + | function utf84mb_convertToUCS4($matches) |
</code> | </code> | ||
==== utf84mb_convertToUTF8() ==== | ==== utf84mb_convertToUTF8() ==== | ||
行 1433: | 行 1435: | ||
*/ | */ | ||
} | } | ||
- | function utf84mb_convertToUTF8() | + | function utf84mb_convertToUTF8($matches) |
</code> | </code> | ||
==== VerifyWebToken() ==== | ==== VerifyWebToken() ==== | ||
行 1460: | 行 1462: | ||
*/ | */ | ||
} | } | ||
- | function VerifyWebToken() | + | function VerifyWebToken($webTokenString,$webTokenId,$key) |
</code> | </code> | ||
==== CreateWebToken() ==== | ==== CreateWebToken() ==== | ||
行 1487: | 行 1489: | ||
*/ | */ | ||
} | } | ||
- | function CreateWebToken() | + | function CreateWebToken($webTokenId,$time,$key) |
</code> | </code> | ||
==== CheckIsRefererValid() ==== | ==== CheckIsRefererValid() ==== | ||
行 1527: | 行 1529: | ||
*/ | */ | ||
} | } | ||
- | function CheckCSRFTokenValid() | + | function CheckCSRFTokenValid($fieldName,$methods) |
</code> | </code> | ||
==== CheckHTTPRefererValid() ==== | ==== CheckHTTPRefererValid() ==== | ||
行 1566: | 行 1568: | ||
*/ | */ | ||
} | } | ||
- | function RemovePHPCode() | + | function RemovePHPCode($code) |
</code> | </code> | ||
==== GetIDArrayByList() ==== | ==== GetIDArrayByList() ==== | ||
行 1590: | 行 1592: | ||
*/ | */ | ||
} | } | ||
- | function GetIDArrayByList() | + | function GetIDArrayByList($array,$keyname) |
</code> | </code> | ||
==== GetBackendCSPHeader() ==== | ==== GetBackendCSPHeader() ==== | ||
行 1629: | 行 1631: | ||
*/ | */ | ||
} | } | ||
- | function CheckIncludedFiles() | + | function CheckIncludedFiles($file) |
</code> | </code> | ||
==== Logs_Dump() ==== | ==== Logs_Dump() ==== |