Log in

View Full Version : Problem with Custom Page


illustrationism
04-23-2006, 01:37 PM
Hey,

I read the very well-written tutorial here: https://vborg.vbsupport.ru/showthread.php?t=98009, but I am not having much success...

Pretty much, I have written a custom uploading script here:
www.whatever.com/upload

But the forums are here:
www.whatever.com/forums

The PHP parser stops (and I mean stops, no error or anything) at the line:

require_once('./global.php');


I wrote a quick script called testdavid.php in the /upload/ dorectory and commented out everything but $_SERVER['PHP_SELF']. It seems that the value of $PHP_SELF is empty, and the location of $_SERVER['PHP_SELF'] is /upload/testdavid.php. So I don't know what to use for chdir(). As of now, I only have access to the upload directory. Is there anything I can do, or that i may be doing wrong?

Thanks,
David

Eikinskjaldi
04-23-2006, 05:55 PM
Try using,
include(DIR . '/forums/global.php');

I have used it for my own needs more then once and it has yet to fail me. You may need to set it up to point right, but as far as I recall it should do that automatically with a basic php install. May work, may not.