![]() |
| ||
| $_server['script_name'] Please I need some help! When I am developing, these code below works fine: <?php But, when I put on the server : <?php It won't work. Please help me out. Best regards Max |
| ||
| Re: $_server['script_name'] echo or print the variable to see what it actually is. <?php |
| ||
| Re: $_server['script_name'] Excuse me! I don't realy understand what you mean. These are my code: <?php What would you have done to make it work. |
| ||
| Re: $_server['script_name'] try this, if (preg_match("/bobo\/index.php/i",$_SERVER['REQUEST_URI'])) {
instead of if($_SERVER['SCRIPT_NAME'] == '/bobo/index.php') or like was said above just echo $_SERVER['SCRIPT_NAME'] ; to see what the variable actually is and adjust from there. Quote:
|
| ||
| Re: $_server['script_name'] I have tried the code you send to me, but it did not work. And when I tried the first code you sent: <?php It only eched the word "index.php", not the style. Thanks one more time for efforts. Please I am open for more helps Best regards. |
| ||
| Re: $_server['script_name'] Okay, that means that $_SERVER['SCRIPT_NAME'] equals index.php. Therefore, compare the current page($_SERVER['SCRIPT_NAME']) to index.php: <?php |
| ||
| Re: $_server['script_name'] comparing $_SERVER['SCRIPT_NAME'] == 'index.php' will not work for you as /bobo/index.php' and '/aktuelle seite/index.php' will give same style. try below to see wat you get echo $_SERVER['PHP_SELF']; |
| ||
| Re: $_server['script_name'] I have tried the code, but did not work. Regards |
| ||
| Re: $_server['script_name'] hmm for both $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF'] not to work you might have a problem with your php. $bobo = strrpos($_SERVER['SCRIPT_FILENAME'], "/bobo/index.php"); |
| ||
| Re: $_server['script_name'] Perhaps we are not hearing the whole story. Would "bobo" happen to be a subdomain instead of a subfolder? This would cause script_name and all the rest to just spit out index.php. So is it? a subdomain would look like this [[ www.bobo.domain.com ]] instead of [[ www.domain.com/bobo/ ]] |
| All times are GMT -4. The time now is 3:14 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC