I am in need of help. I have created a chart PHP portlet and I am able to
deploy. The problem is that the PNG image file
displays as binary. I know that the file is created and is there and I can
open it with my browser and it displays the Pie chart

My php code:
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title>Libchart pie chart demonstration</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
</head>
<body>
<img alt="Pie chart" src="<%=renderRequest.getContextPath()%>/demo3.png" />
</body>
</html>

I read in some articles that you need to use the jsp code <%=
renderRequest.getContextPath()%>
but is not working. I also try it without the JSP code and I get the same
result.

This is what is displayed
-----------------
�PNG  ���
IHDR��X��������O�G��]IDATx���}�U�����pI��]�"���KE"l*Y�X�T�&Z�BL�����E;�
!m�1�HcT���n0 Q��
��M6��d��5�Y���Rl�p��͝q�3s�s�s��''f�[EMAIL PROTECTED]'[EMAIL 
PROTECTED]@[EMAIL 
PROTECTED]@?u�����8x���.��ǧ�Zv�sN<�kSf_z޲�M�_�s��7�����M����=a���#�0�������s��7/
!���eW��I3>M�䙋��v��g�ye��ݷT!���Y�`L3����O���m��p�!<
�o4*8��l�m;�����>[EMAIL PROTECTED]
<A bunch of other stufff and then the last part of what it is displayed>
��!�H�1{�m�va2�����"g#B���ag'�̋�O��Z�l� �u�KZ
3,b�Kp����#,o5̧���_��`���0�����0�(�2~)ρ�6B�\6�h�a]�X��?��FX��fQ�G���FX��Q�A�*���FX���u�h���F��vX�4V�yU�m�`#�n;[EMAIL
 PROTECTED](�`#4
a�'@!�-�B���g#�Q���l�`#4"
a��l��D!�w���Р(���~6B��s�ۃ�l���*���6B�RՉ��g#!�f�2Z�l�
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@B�B�B�B��ȟ��9��(e�����IEND�B`�
Pie chart 
document.getElementById("p_p_id_libchartportlet_WAR_libchartportlet_").portletId
= "libchartportlet_WAR_libchartportlet";
document.getElementById("p_p_id_libchartportlet_WAR_libchartportlet_").columnPos
= 5; if (!Liferay.Portlet.isAjax("libchartportlet_WAR_libchartportlet")) {
Liferay.Portlet.process("libchartportlet_WAR_libchartportlet"); } jQuery(
function() { Liferay.Util.portletTitleEdit( { obj:
jQuery("#p_p_id_libchartportlet_WAR_libchartportlet_"), plid: "10133",
doAsUserId: "", portletId: "libchartportlet_WAR_libchartportlet" } ); } );
-----------------

I do not get all of the the javascript stuff after "Pie chart" above if I do
not use the JSP code.


Any ideas of what is wrong with my PHP displaying of the PNG file.

Thanks,

rotseN
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to