The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Howto include() my.php in Vbulletin if no output Display
I have a php script, it needs to included at the very PHP script this Vbulletin.
Code:
<IfModule mod_php5.c> php_value auto_prepend_file "/my.php" </IfModule> anyone knows, how to fix this problem. |
#2
|
|||
|
|||
$_SERVER['REMOTE_ADDR'] should be available even with register globals turned off. Otherwise some things in vBulletin would also not work.
But if it will work as an auto_prepend_file like you are trying i don't know. |
#3
|
|||
|
|||
Quote:
shown me please simply way to inculude() my.php at the very PHP script this Vbulletin and get $_SERVER['REMOTE_ADDR']. I have a test script geschieben. It can get $_SERVER['REMOTE_ADDR']. in browser: http://mysite.com/test.php test script: Code:
<?php $ip = $_SERVER['REMOTE_ADDR']; echo "$ip"; ?> Code:
PHP Notice: Undefined index: REMOTE_ADDR in my.php on line XX i have read http://www.vbulletin.com/docs/html/t..._externalfiles if i want only to run a php script at top of every php script this vbulletin. It is nothing with output Display. below code is correct for this thing? Howto test it? Create a Plug-in for global_start Code:
ob_start(); require_once(DIR.'my.php'); ob_end_clean(); |
#4
|
|||
|
|||
Well for one this line will output $ip not xx.xx.xx.xx.
PHP Code:
You might just have found a bug in PHP with php_value auto_prepend_file so you report the bug and see what the PHP developers say. |
#5
|
|||
|
|||
Quote:
thank you for response. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|