PHP code not running

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aliweb
Forum Newbie
Posts: 5
Joined: Tue Aug 22, 2006 1:40 am

PHP code not running

Post by aliweb »

Hi

I have an index.php page which contain some include files. When I run this page it doesn't run the PHP code. It just displays HTML code.
All images are being displayed dynamically by getting image name from database but it doesn't show any of the images. When I right click on image in IE and check its properties the image path is shown as

http://localhost/mysite/images/<? $image_name ?>

I tried running the code on IIS 5 (Win2K) and IIS 6(WinXP) but same problem.

Then I ran it on Linux but there it displays all the text in Chinese language (or some other) and also displays all the PHP code as it is without running it on server.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP code not running

Post by Christopher »

It should be:

Code: Select all

http://localhost/mysite/images/<?php echo $image_name; ?>
(#10850)
aliweb
Forum Newbie
Posts: 5
Joined: Tue Aug 22, 2006 1:40 am

Post by aliweb »

oh!!!!! it was just a small mistake!!! :x

thanks man, it worked :D
Post Reply