PHP not working

Alles, was PHP betrifft, kann hier besprochen werden.

PHP not working

Postby simonstamp » 03. November 2009 22:43

I am new to PHP I have just downloaded XAMPP everything is working in the status and I can access the index page on localhost however PHP files are not working. I have put them in the htdocs folder. HTML pages read from here but not PHP. What am I doing wrong??
Many Thanks

Si
simonstamp
 
Posts: 1
Joined: 03. November 2009 22:36

Re: PHP not working

Postby Izzy » 04. November 2009 04:57

How are you trying to read a php file?

Try typing in your browser http://localhost/yourfile.php

BTW what do you see when you type http://localhost and http://127.0.0.1 in your browser?

php coded files have to be parsed by the web server.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PHP not working

Postby Altrea » 04. November 2009 09:27

Maybe you use short_tags
<?
/* PHP here */
?>


instead of
<?php
/* PHP here */
?>

?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4511
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.0
Operating System: W7Ux64


Return to PHP

Who is online

Users browsing this forum: No registered users and 4 guests