Jump to content

Recommended Posts

Hi,

 

I'm quite new to PHP, at the moment I'm actually going through some tutorials to learn it properly.

I am using dreamweaver in code view to follow the tuts.

 

I am using the following code to embed an image into html with php:

<img src="<?= "../images/my_first_embedded_php.gif" ?>" width="380" height="23" hspace="0" vspace="0">

 

The link is relative to my image directory, but it isn't showing properly on my server (I'm using WAMP) (please see image).

 

The tutorial I am following has their image showing, so I'm not sure what I'm doing wrong. Any help would be appreciated.

 

Nisa.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/221774-embedded-image-not-showing/
Share on other sites

It's the lazy-way short open tag, which can be turned off on any particular server, and so has wasted many more man-hours than the few seconds it saves by not typing a few characters.

 

No published code should use it because it results in non-portable code.

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.