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!
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
OK i'm probaby in the wrong section if so please let me know where to post this...
Ok i have a problem, with my PHP, i was using ColdFusion and Dreamweaver, but when ever i tried to run any PHP script it wouldn't display, i then tried IIS but that prompts me to download the PHP file, i don't really do much/any PHP code but i am now confused why i can't run some thing as simple as :~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test</title>
</head>
<body>
Today's date is: <?php echo date('j F Y'); ?>
</body>
</html>
all i get is:~
Today's date is: patrikG | Help us, help you. Please use
I haven't played IIS so I can't be much help but did you download the php files from http://www.php.net/downloads.php there is even a msi version that should do the trick for you if you haven't.
Maybe a dumb question, but what is the name of the test file?
If it is "test.html" it won't run the php code.
if it is "test.php" it will.
I may be off base with the suggestion, but....
Not sure how it works with IIS but you should probably be accessing the file through localhost for php to recognize what it is - at least that how it works on my machine. Using the browser's File | Open dialog to open the file won't work.
It has been a while since the last post to this thread so you may have already found a solution.
I think your problem is not PHP. I think it is how you have IIS configured. IIS sees the .php file as an unknown file type and instead of invoking the PHP engine treats it as an unknown file type which usually means 'download the file'. Check your file associations withing IIS.