0
I have a PHP function:
if( !function_exists('site_url_full') ) {
function site_url_full() {
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
$PHPSELF = $_SERVER['PHP_SELF'];
$path = pathinfo( $PHPSELF );
$diretorio = $path['dirname'];
$diretorio = "";
if(is_dir(PATH)) {
$url = $protocol . $_SERVER['HTTP_HOST'] . $diretorio;
} else {
$url = $protocol . $_SERVER['HTTP_HOST'];
}
return $url . $_SERVER['REQUEST_URI'];
}
}
Use to 'grab' the full page URL but when it is called inside a file it is called in an event with jQuery . load(); the URL taken is that of the file, I don’t know how to call the URL that called the file, and I need this function to run inside the uploaded file, is there any way to get the main URL from the uploaded file? Because the URL is included within an input*Hidden of the requested file.
Thanks for that rs =)
– ElvisP