how to display php file in explorer?

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
wenquxing
Forum Newbie
Posts: 9
Joined: Thu Dec 02, 2004 12:17 am

how to display php file in explorer?

Post by wenquxing »

I am writing a web page using php, and I can see it displayed in the php compiler, but I can't display it in the explorer(only php "code" displayed,eg.
<?php echo "aaa"?> is displayed not "aaa")
anyone can tell me why??thanks.
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

php is a interpreted language, which means you need an interpreter program to execute the code (the php parser)
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Have you configured the web server to parse .php? Check the installation instructions for your server in the PHP manual.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

if your talking about double clicking on a file, its always going to just show the code.

like the others said, if you want php to parse and interpret the code, you need to request the file through the webserver. i assume thats what you meant by it working when your run it through the complier(the webserver)?
Post Reply