✏️ 正在编辑: FunctionsRegister.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/plugins/FunctionsRegister.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php if (!function_exists('publicPath')) { function publicPath($sub): string { return PUBLIC_PATH . $sub; } } if (!function_exists('siteKey')) { function siteKey(): string { $siteKey = Yuppie_Auth::getSiteKey(); return $siteKey === '/' ? "yuppiecred-shell" : $siteKey ; } } if (!function_exists('toMoney')) { function toMoney($value): string { return 'R$ ' . number_format($value ?? 0, 2, ',', '.'); } } if (!function_exists('domain')) { function domain($action = ''): string { $siteKey = Yuppie_Auth::getSiteKey(); $siteKey = $siteKey && $siteKey !== 'public' ? "/" . $siteKey : ""; $subdominio = explode('.', str_replace( ['https:', '/'], '', $_SERVER['SERVER_NAME'] ))[0]; $siteKey = $subdominio === 'sistemayuppie' || $subdominio === 'admin' || $subdominio === "localhost" ? $siteKey : ''; return "https://" . $_SERVER['HTTP_HOST'] . $siteKey . $action; } } if (!function_exists('ipClient')) { function ipClient() { return $_SERVER['HTTP_CLIENT_IP'] ?? $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['HTTP_X_FORWARDED'] ?? $_SERVER['HTTP_FORWARDED_FOR'] ?? $_SERVER['HTTP_FORWARDED'] ?? $_SERVER['REMOTE_ADDR'] ?? 'UNKNOWN' ; } }
💾 保存文件
← 返回文件管理器