Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/97217-issue-with-include-function-in-php5/
Share on other sites

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.