I'm trying to integrate the vb in with existing pages on my site. Ive included the necessary files
PHP Code:
chdir("../forums/");
require('../forums/global.php');
require('../forums/includes/functions_user.php');
This works fine, the the vb variables work, and I changed all the session variables, and that works fine
The problem comes with my upload script as well as admin panel. When i upload a file without the doing the chdir, or requiring the two files then it works fines. When those three lines are added to the code then the move_uploaded_file function no longer works.
The other problem is with the admin panel. its like global.php isnt being found. Unless i just had a brain fart and didn't require them correctly I dint know why its not working. The admin panel is one folder deeper into the directory, so i used this to include the files:
PHP Code:
chdir("../../forums/");
require('../../forums/global.php');
require('../../forums/includes/functions_user.php');
Heres the errors I'm getting
Code:
Warning: main(../../forums/global.php) [function.main]: failed to open stream: No such file or directory in /home/watdafl/public_html/dev/acp/nav.php on line 3
Warning: main(../../forums/global.php) [function.main]: failed to open stream: No such file or directory in /home/watdafl/public_html/dev/acp/nav.php on line 3
Warning: main(../../forums/global.php) [function.main]: failed to open stream: No such file or directory in /home/watdafl/public_html/dev/acp/nav.php on line 3
Fatal error: main() [function.require]: Failed opening required '../../forums/global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/watdafl/public_html/dev/acp/nav.php on line 3
Does anyone have any ideas as to why either thing is happening or a way to solve it.
Thanks