PHP Hello world.I am newbie -


this question has answer here:

here code

<html>  <head>   <title>php test</title>  </head>  <body>  <?php echo '<p>hello world</p>'; ?>   </body> </html> 

why browser don't show "hello world",but trying save file(helloworld.php)?
sorry stupid question.

php pages run on php webserver. can't give textfile .php extension , double-click it. make sure

  1. you have webserver (e.g. apache httpd) installed.
  2. you have php installed.
  3. make sure php file in webroot (e.g. htdocs)
  4. you go page via url hits server (e.g. http://localhost/page.php)

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -