function define

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthickRAJKUMAR
    New Member
    • Sep 2007
    • 46

    function define

    it i declare the define() in php file could i use it through all the files which is under the same folder fir example i have folder name karthick under that i have 3 php file ,in first file i used the define("hai", "Hello world.");


    could i use the hai definition in rest of two files
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by karthickRAJKUMA R
    it i declare the define() in php file could i use it through all the files which is under the same folder fir example i have folder name karthick under that i have 3 php file ,in first file i used the define("hai", "Hello world.");


    could i use the hai definition in rest of two files
    The constant is only available if you include (or require) the file with the definition in the other files. Even then, you need to have php safe mode turned on.

    Comment

    • MarkoKlacar
      Recognized Expert Contributor
      • Aug 2007
      • 296

      #3
      Hi,

      I'm not sure if you can do that, I would however be interested in the end result.

      Why don't you just try doing it??

      Cheers

      Comment

      Working...