I have code that doesn't seem to work. I am using three include_once statements to bring in variables and common dbase connections.
It works fine on Godaddy, but not on my local site. The files are being included, (they show up when I do a "view source" from the browser. However, it seems the variables are going out of scope at the end of the included file. I know that because when I add a print statement to print out a variable I get an undefined variable error.
I've done a lot of Google searches, but no satisfactory answer for this particular problem.
Any ideas? thanks.
include_once [SOLVED]
Moderator: General Moderators
Re: include_once
Solved.
The file was written with <? at the beginning instead of <?php. Once I added php to the files, everything works fine.
The file was written with <? at the beginning instead of <?php. Once I added php to the files, everything works fine.