|
#1
|
||||
|
||||
Global Call
I was just playing around with FreeTSP code.
Both takeeditaltusercp.php & takeeditusercp.php At the bottom of the file have the return header Code:
header("Location: $site_url/usercp.php?edited=1&action=$action".$urladd); Code:
header("Location: $site_url/altusercp.php?edited=1&action=$action".$urladd); Which is exactly what it does. But it should not work. Because no global for $site_url has been defined. Example Code:
global $site_url; Now both files call function_main.php. And that file calls function_config.php. Which contains the definition of $site_url. If that is the reason it works. That then raises the question. Do we really need to use the global define at all in any file ?? I have just removed all the global defines from the index.php. Some things work fine without the global call, yet others give errors ?? I have checked U232 V4 takeeditcp.php And the same thing. No main or any global call. But the same line at the bottom of the file. Code:
header("Location: {$INSTALLER09['baseurl']}/usercp.php?edited=1&action=$action" . $urladd); It is just me wondering WHY? Can any one shed any light on this for me. |
#2
|
||||
|
||||
more then likely your getting something like
Code:
Location: /usercp.php?edited=1 if you look at most themes you well see they dont put site url in them for images and they work fine
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#3
|
||||
|
||||
Just as Joe said, its only used for mail, is actually defined on takeeditcp
Code:
$urladd.= "&mailsent=1"; Last edited by Bigjoos; 23rd October 2016 at 12:44. |
Tags |
call , global |
|
|