Images not showing up after moving installation
Permalink
I'm moving an installation from my development server to the client's server, and so far everything has gone well...except that the images aren't showing up.
The problem is that the image tags aren't coming across as normal HTML tags...they're the ones in the template files. In other words, if you look at the page source, instead of this:
...I'm getting this:
Why is the PHP tag leaking through into the HTML source code?
The problem is that the image tags aren't coming across as normal HTML tags...they're the ones in the template files. In other words, if you look at the page source, instead of this:
<img src="/arch/images/logo_small.gif" width="151" height="92" alt="" />
...I'm getting this:
<img src="<?=$this->getThemePath()?>/images/logo_small.gif" width="151" height="92" alt="" />
Why is the PHP tag leaking through into the HTML source code?
Try <?php echo instead of <?=
If you've used a lot of 'short open tags' (i.e. using <? ?> vs. <?php ?>) you should try to edit your php.ini and set "short_open_tag = on".
I would then recommend going through your code and changing your '<? ' to '<?php ' for future compatibility.
If your developing on a Windows machine, I use a free product called AstroGrep. I find it invaluable for finding strings buried deep in the code. It will quickly find all occurrences of '<? ' or '<?='.
I would then recommend going through your code and changing your '<? ' to '<?php ' for future compatibility.
If your developing on a Windows machine, I use a free product called AstroGrep. I find it invaluable for finding strings buried deep in the code. It will quickly find all occurrences of '<? ' or '<?='.