Jump to content

Include PHP file in SHTML


AtomicRax

Recommended Posts

In a server parsed .shtml file I have:

 

<!--#include virtual="/newsManager/output.php"-->

 

On my DirectAdmin server, this works with no problem. On my server without DirectAdmin, I do not see the desired output instead all I see is "junk characters"

 

I've double checked to make sure the server was configured for SSI and that it's enabled and working properly -by including .txt and .html files with no problem. It's not that it doesn't work, it's that it doesn't do what I want it to.

 

��W�h�Վ�3k�߽("I[� ���s朙Q�..?���������+�z�3u�ҿ� ?��=�SX����Y�P�f���.t��#H�p$oP�E����ʥз�맰%�wW�z���b���6�S8 ��>��!��X��AH.=q[�W�#5v�7Ԙ�)6n

 

That's what some of it looks like. I've researched other forums and found http://stackoverflow.com/questions/839272/how-to-include-php-file-in-shtml-pages which appears to be the same problem, but when I tried their solution, I got the download prompt when I try to access the page.. it no longer shows up as a web page at all.

 

I'm not really looking to move my .shtml file to a .php file... I'm trying to find the solution to this problem because if it works on one server, I don't see why it can't work on the other.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/230197-include-php-file-in-shtml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.