23.12.2012 Posted August 1, 2009 Share Posted August 1, 2009 Well... trying to build my first application using DW as a text editor (due to syntax goodies), I came across this little retarded problem: When I open <?php, it is seen as an HTML tag instead of a beginning of a PHP script: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>SanGYM Iasi ● Client Adaugat</title><link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen" /></head><body><?phpecho "<p class='date_client'>Nume: </p>" . $first_name . ' ' . $last_name;echo "<p class='date_client'>Telefon: </p>" . $phone;echo "<p class='date_client'>Cod: </p>" . $reg_num;echo "<p class='date_client'>Abonament: </p>" . $membership;echo "<p class='date_client'>Mentiuni: </p>" . $other;?></body></html> Browser View | Source Code ViewAlso, Apache is switched on and test with a phpinfo. Link to comment Share on other sites More sharing options...
Ingolme Posted August 1, 2009 Share Posted August 1, 2009 You must meet two requirements for PHP to run: The file must be on a server that can execute PHP The file extension is .php, not .html Link to comment Share on other sites More sharing options...
23.12.2012 Posted August 1, 2009 Author Share Posted August 1, 2009 It meets both of them.Well... the problem is with Apache. It seems MAMP (Mac Apache MySQL PHP) crashes my Apache every two days... Link to comment Share on other sites More sharing options...
Ingolme Posted August 1, 2009 Share Posted August 1, 2009 Are you accessing the file through the http:// protocol or through the file:// protocol? Link to comment Share on other sites More sharing options...
23.12.2012 Posted August 1, 2009 Author Share Posted August 1, 2009 I'm an epic fail. Yes, I was accessing it through FILE. Thanks a lot, it's a shame :)It's just that I was used to FILE > OPEN when I was using plain HTML and CSS, without an web server. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.