josephicon Posted February 22, 2007 Share Posted February 22, 2007 Hi all, if I include a file which contains an if statement will it run the if and other functions from within the included file, or is include only for html and the likes? Many thanks. Link to comment https://forums.phpfreaks.com/topic/39634-solved-include-or-require-will-the-if-from-within-execute/ Share on other sites More sharing options...
pikemsu28 Posted February 22, 2007 Share Posted February 22, 2007 Yes. it will run the if statements/functions. Link to comment https://forums.phpfreaks.com/topic/39634-solved-include-or-require-will-the-if-from-within-execute/#findComment-191297 Share on other sites More sharing options...
Iceman512 Posted February 22, 2007 Share Posted February 22, 2007 Hi, I think it depends entirly on the composition of the files that you are including and the file you are including to. An include file is simply 'dropped' into the parent file as an inline file. Therefore, no <html> or <head> tags are required. I would assume that an 'if' conditional statement should execute fine. Regards, Iceman Link to comment https://forums.phpfreaks.com/topic/39634-solved-include-or-require-will-the-if-from-within-execute/#findComment-191302 Share on other sites More sharing options...
redarrow Posted February 22, 2007 Share Posted February 22, 2007 a include satement and if statement can be used on an included page but remember that once the page has been included now as one page u got two includes on the page. as long as the page does not have any set varables as the page it is included to all should be ok. Link to comment https://forums.phpfreaks.com/topic/39634-solved-include-or-require-will-the-if-from-within-execute/#findComment-191310 Share on other sites More sharing options...
josephicon Posted February 22, 2007 Author Share Posted February 22, 2007 Thanks all! My problem was that i didnt php(<? )tag the file included Link to comment https://forums.phpfreaks.com/topic/39634-solved-include-or-require-will-the-if-from-within-execute/#findComment-191518 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.