Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8925679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:45:48+00:00 2026-06-15T07:45:48+00:00

I am just trying a simple test of php on my computer: Archlinux +

  • 0

I am just trying a simple test of php on my computer:

  • Archlinux + httpd + php
  • phpinfo() test is ok
  • code is written with vim , no copy and paste

here is the code (taken from a book) that doesn’t work as expected:

<html>
<head><title>Test PHP </title></head>
<body>
<h1>Texte mis en avant</h1>
<?php
echo "<p>ceci est du code PHP</p>";
echo "<p>simple non?</p>";
?>
</body>
</html>

and here is what I get in browsers:

Texte mis en avant

ceci est du code PHP

“; echo “

simple non?
“; ?>

What is wromg with this? (first time I block on something such simple)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:45:49+00:00Added an answer on June 15, 2026 at 7:45 am

    By default PHP script files have to be named with use of .php suffix, to be passed to PHP interpreter as the file name suffix is what is being taken into consideration during page serving. If you use .html as you said, then it simply goes as is, because HTML knows nothing about PHP. So you should either rename your file to end with .php (simplest approach) or tell your http server that .html files shall also be handled by PHP. I.e. if you are using Apache and .htaccess can be used per vhost, create .htaccess file in root of your service with content:

    <FilesMatch "\.html$">
      ForceType application/x-httpd-php
    </FilesMatch>
    

    which will tell your httpd, that files matching given pattern shall also be considered PHP scripts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a very simple REST server. I just have a test
I'm trying a simple ajax test in Wordpress / Buddypress. The code below works
I'm trying to test a simple login system without a db, just for testing
I am just trying to test a simple ajax call on my server using
i'm fairly new to django and just trying a couple simple experiments to get
Just trying to implement a simple audit logging solution with Grails 2.0.2 and it
I just started trying to build simple GUIs because I've always used command-line script
I'm just trying to get a simple example of accessing a custom java class
I am just trying to get my head around simple view switching for the
I'm just trying to do a simple text file read in java for my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.