terrakota
08-05-2004, 12:06 AM
hello
im trying to display a simple text in the brower from the <img> tag
please any help focus in c++.
here is the html page that i call
---------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>counter</title>
</head>
<body>
<img src="cgi-bin/counter.exe">
</body>
</html>
----------------------------------------------------------
this should display the 2004 year
heres the c++ source
--------------------------------------------------------------
#include <iostream>
using namespace std;
int main()
{
cout << "content-type: text/plain\n\n";
cout << "2004";
return 0;
}
-------------------------------------------------
the idea is that when i load the html page the 2004 should be displayed
when i run the cgi typing the url of the cgi it runs just fine but
when trying to load it from the <img> tag the text is not displayed
it just shows the picture frame with the red x on it.
please help me to clarify what im doing wrong
and please excuse my poor english
im trying to display a simple text in the brower from the <img> tag
please any help focus in c++.
here is the html page that i call
---------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>counter</title>
</head>
<body>
<img src="cgi-bin/counter.exe">
</body>
</html>
----------------------------------------------------------
this should display the 2004 year
heres the c++ source
--------------------------------------------------------------
#include <iostream>
using namespace std;
int main()
{
cout << "content-type: text/plain\n\n";
cout << "2004";
return 0;
}
-------------------------------------------------
the idea is that when i load the html page the 2004 should be displayed
when i run the cgi typing the url of the cgi it runs just fine but
when trying to load it from the <img> tag the text is not displayed
it just shows the picture frame with the red x on it.
please help me to clarify what im doing wrong
and please excuse my poor english