Announcement

Collapse
No announcement yet.

global.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • global.php

    how do i require this file into my non vb pages? it keeps wanting to include more files. when i put the paths in i get a blank page
    help
    www.xixora.com
    Goldrush : A Soldier of Fortune Modification going for the GOLD!

  • #2
    PHP Code:
    require('./global.php'); 
    if the file is calling global.php from outside the forum directory you can specifity the path in the require statement or do a...

    PHP Code:
    chdir('/home/jake/public_html/forum'); 
    that path just happens to be the one i use for my portal.

    Comment


    • #3
      Originally posted by Jakeman
      if the file is calling global.php from outside the forum directory you can specifity the path in the require statement
      That actually won't work, since global.php tries to require other files from it (admin/functions.php, admin/config.php, admin/sessions.php, etc.) so PHP will try to find root/admin/config.php (without /forums), so it would fail.

      You must use chdir() or change the include path.
      Chen Avinadav
      Better to remain silent and be thought a fool than to speak out and remove all doubt.

      גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

      Comment


      • #4
        wow thanx i poseted it on vb.org and no reply but theres alot of help here i should come more often.
        i think i should of thought out my question more clearly

        Thanx
        now its time to figure out how to use chdir :P
        www.xixora.com
        Goldrush : A Soldier of Fortune Modification going for the GOLD!

        Comment


        • #5
          PHP Code:
          chdir(forums);
          require 
          'global.php'
          i do this but it ruins my site =/ it doesnt include all my images and it ruins my javascipt
          www.xixora.com
          Goldrush : A Soldier of Fortune Modification going for the GOLD!

          Comment


          • #6
            nm
            fixed it sort of.
            PHP Code:
            chdir('C:/webdev/forums');
            require 
            'global.php';
            chdir("c:/webdev"); 
            i need to make that kind of dynamic now cos i gotta port over from windows to linux all the time
            www.xixora.com
            Goldrush : A Soldier of Fortune Modification going for the GOLD!

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X