1
dougfc5
How do I show an image in custom block with php?
  • 2007/9/9 7:48

  • dougfc5

  • Just popping in

  • Posts: 39

  • Since: 2005/8/1 1


Hi all,

I want to show an image in a custom block with php instead of html by the following code:

echo "<img src="http://www.mydomain.com/image.gif">";

But it fails, it show nothing.

Anyone have the solution? Thanks in advance.

I use XOOPS 2.013.2 version.

cheers,
doug

2
PlaneGuy
Re: How do I show an image in custom block with php?
  • 2007/9/9 8:11

  • PlaneGuy

  • Just popping in

  • Posts: 10

  • Since: 2004/11/1


Be careful with your double quotes (") and single quotes ('). The string you have pasted is an incomplete HTML expression, because the " for the URL actually closes off the echo string. It'll cause a PHP error, which you aren't seeing.

3
dougfc5
Re: How do I show an image in custom block with php?
  • 2007/9/9 8:43

  • dougfc5

  • Just popping in

  • Posts: 39

  • Since: 2005/8/1 1


Thanks a lot, PlaneGuy!

I get it done by your hint by changing " into ' as follows:

echo "<img src='http://www.mydomain.com/image.gif'>";

cheers,
doug

Login

Who's Online

159 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits