[thelist] PHP: include not getting variable [SOLVED]

Kelly Hallman khallman at ultrafancy.com
Wed Jan 7 09:05:55 CST 2004


On Wed, 7 Jan 2004, Tom Dell'Aringa wrote:
> I had chopped the URL... When you go all the way outside like that,
> somehow the variable is out of scope.

That makes sense. When you included the file via URL, you were probably
not getting the PHP source at all, but the output from that URL (PHP
source already interpreted by the web server). If that output included the
proper PHP code, it may have worked. As it was, you were probably just
including the equivalent of a static HTML file with no PHP.

You could try it by reverting back to the URL method and renaming the
included file .txt or something that won't be parsed as PHP by the web
server. Best to avoid URL includes entirely if you don't need them though.  
Less web server overhead, less debugging goose chases.

-- 
Kelly Hallman
// Ultrafancy



More information about the thelist mailing list