jdbarry Posted March 21, 2008 Share Posted March 21, 2008 Hi All, My service provide just switched to PHP5. I use the include function alot on my site to load various content but mainly CGI/Perl. Previously, it would execute and then output the content to the site but since upgrading, it seems to be outputting all the CGI code and prints out the HTML as HTML, not executing any of the code. Non-cgi pages (html, php) print out normally. I've looked every where and tried doing things differently to no avail. Tried the exec function but it is disabled. Does anybody of a work around? Note: I used the include statement as include($_GET['page']). So sometime I'm loading cgi, php or html. I would need a solution that can load all 3 the way it worked before. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/97217-issue-with-include-function-in-php5/ Share on other sites More sharing options...
wildteen88 Posted March 21, 2008 Share Posted March 21, 2008 If you want to include only the output of the cgi script then I'd include it using the http:// wrapper, eg: include 'http://www.mysite.com/' . $_GET['page']; For html/php files don't include the http:// wrapper. However it would be better to convert your cgi script to PHP. Quote Link to comment https://forums.phpfreaks.com/topic/97217-issue-with-include-function-in-php5/#findComment-497441 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.