test PHP file does not execute correctly

Problems with the Windows version of XAMPP, questions, comments, and anything related.

test PHP file does not execute correctly

Postby demzo » 26. July 2012 23:57

hello everyone,

i would be very happy if anyone could supply me with a hint:

i am new to PHP and have begun setting up a development environment on my PC. i installed XAMPP 1.8.0 and wished to test whether PHP is installed and working. i created a test file in the root folder, htdocs and executed it by typing localhost/test.php in the browser url field.

The browser returns the following message:

Parse error: syntax error, unexpected '>' in C:\xampp\htdocs\test.php on line 6

the test code which i entered is a standard test code:

<html>
<head><title>PHP Test</title></head>
<body>
<p>This is an HTML line</p>
<?php
echo “<p>This is a PHP line</p>”;
phpinfo();
?>
</body></html>

any advice would be greatly helpful. thank you.
demzo
 
Posts: 1
Joined: 26. July 2012 23:41
Operating System: windows

Re: test PHP file does not execute correctly

Postby hackattack142 » 27. July 2012 03:17

It is a problem in your quotation marks on this line
Code: Select all
echo “<p>This is a PHP line</p>”;


it should be
Code: Select all
echo "<p>This is a PHP line</p>";
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: dogmatic and 30 guests