SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    include using a defined constant

    I have a help filed called aide.php.
    for each site I have some specific instructions that are in aide_perso.php.
    I want to define a constant that will be the name of this php file.
    Then in my aide.php file , I want to include aide_perso.php using a constant


    PHP Code:
    DEFINE ('HELP_FILE''aide_perso.php'); 
    is in a file called connect.php

    in aide.php I have
    PHP Code:
    <?php
     
    // this ends the login section verification 
    include (HELP_FILE);
    ?>
    connect.php, aide.php and aide_perso.php are all in the same folder.

    I get an error message
    Notice: Use of undefined constant HELP_FILE - assumed 'HELP_FILE' in C:\wamp\www\mozaccycloclub\admin\custom\aide.php on line 56
    now all the other constants in connect.php are defined, so I think this is more than just a define issue.

    any help would be appreciated

    pat

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,510
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    connect.php is included before the include of HELP_FILE?

  3. #3
    SitePoint Addict
    Join Date
    May 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    YEs, connect.php is the first thing executed.

    Quote Originally Posted by guido2004 View Post
    connect.php is included before the include of HELP_FILE?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •