How to run a simple php file

My website URL is: http://plutokimo.epizy.com/

So i have this simple php file:

<?php> echo "hello world"; ?>

and i want to run it on my website. my index html looks like this. Now how can i run the php file there?

index.html (Dec 18, 2019 - Codeshare):

<head>

<title> Give us your Data </title> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel = "stylesheet" href = "css/tables.css">


</head>


<body>


<table style="width:100%">
Name Vorgesetzter Mitarbeiter-ID
</body>

like this:

<html><head>

<title> TestPage</title> 
    <link rel="stylesheet" href="/css/helloworld.css">

</head>



<body>

<h1>Hello Karim this testpage is working</h1>


<div id="Kasten">
<?php echo "hello world"; ?>
</div>
</body></html>

you can put php code snippets where you want that prints (for example it’ll print hello world instead of test.) :slight_smile:

1 Like

So i tried it with this code:

   <html>

	<head>
	
	<title> Give us your Data </title> 
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
	<link rel = "stylesheet" href = "css/tables.css">
	
	
	</head>
	
	
	<body>
	
	
	<table style="width:100%">
  <tr>
    <th>Name</th>
    <th>Vorgesetzter</th> 
    <th>Mitarbeiter-ID</th>
  </tr>
  
  
  <tr>
    <td><input id= "Name1"></input></td>
    <td><input id = "Vorgesetzter1"></input></td> 
    <td><input id = "ID1"></input></td>
  </tr>
  
  
  <tr>
    <td><input id= "Name2"></input></td>
    <td><input id= "Vorgesetzter2"></input></td> 
    <td><input id= "ID2"></input></td>
  </tr>


</table>
	

    
<div id="Kasten">
<?php echo "hello world"; ?>
</div>
	
	
	</body>
	




</html>

But it still isnt working. I mean the “kasten” div is showing up, but there is no “hello world” anywhere :frowning:

Then change index.html to index.php.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.