Linked Questions
16 questions linked to/from How can I run a PHP script inside a HTML file?
-1
votes
1
answer
270
views
How do I have to configre XAMPP so that it executds <?php ... ?> in html documents? [duplicate]
I am trying to have XAMPP's Apache execute <?php ... ? that is embedded in a HTML document:
<html>
<head><title>abc</title></head>
<body>
<?php
echo("bla")...
0
votes
0
answers
133
views
Include PHP header in my HTML files [duplicate]
So in working with my website, I am trying to use .php files for my header and my footer to make the code infinitely easier to work with, but I am running into a wall. Here is my code on my index.html ...
0
votes
2
answers
94
views
Convert file extension from .html to .php [duplicate]
In development, should we convert the .html or .htm file extension to .PHP?
To implement the PHP session, and not to redirect if the session is destroyed?
I mean, in C# we use RedirectToPagePermanent ...
-1
votes
1
answer
72
views
PHP echo doesnt show properly when used inript of HTML webpage [duplicate]
I have created a simple web server using LAMP on Ubuntu 18.04, with PHP7 installed. The web server is only accessible by its local IP address, and can host web pages with HTML5 and CSS3, but I'm ...
59
votes
19
answers
154k
views
Using .htaccess to make all .html pages to run as .php files?
I need to run all of my .html files as .php files and I don't have time to change all of the links before our presentation tomorrow. Is there any way to "hack" this with my Apache server?
-3
votes
1
answer
4k
views
How to use PHP redux?
[registervistor.html]
<p>
<b>Userid:</b> <input type="text" name="userid" size="20" maxlength="80" value="" /><br>
</p>
<p>
<b>Password:</...
1
vote
3
answers
3k
views
Apache - How can I run a PHP script when opening HTML files?
Background
I am working on a website, which runs on an Apache server on Windows (at least at the moment). My website directories consist of HTML and PHP files. The idea is to have accessible webpages ...
0
votes
2
answers
1k
views
Command to run html with php script
Can anyone tell here, what is the command to run html with php script. Normally in my linux terminal, if i want to run html, my command is
firefox <filename>.html
It works fine and display ...
0
votes
4
answers
316
views
Use PHP code inside another HTML file, right after <h2>
I have a .php file which renders a webpage and works as intended. It contains the following chunk:
<?php
}
else
{
openConnection();
$userid = $_SESSION["userid"];
...
0
votes
2
answers
2k
views
New CentOS 7 server, PHP doesn't execute on the index page only
Edited: This is not a duplicate - other questions suggested are not the same situation. In this case, MOST html files with PHP work, there's just one file that does not work. Also, all of the answers ...
2
votes
1
answer
2k
views
How to execute php code in html files (php-fpm and apache 2.4) on centos 7
As we have upgrade OS from centos 6.9 to Centos 7 on server. We have installed "Apache/2.4.6" and "PHP 5.6.36 (fpm-fcgi)" on this server. But we are facing problem to execute "PHP Code" in ".html" ...
1
vote
1
answer
983
views
How can I update some placeholder text using form, input and php?
I am trying to update some placeholder text (not the placeholder attribute) with values that come from a form-input, that are all on the same HTML page.
So I have one index.html file and one test.php ...
0
votes
1
answer
135
views
Load string into html from file? Preferably not using javascript
I have the following code in index.html:
<div class="button">
<a href="ridiculously long string" title="title">Title</a>
</div>
I'd like to save "ridiculously long string" ...
0
votes
0
answers
184
views
PHP not working in Firefox on ubuntu 20.04
In firefox I repeatedly tried to get PHP working, but no luck
My code is as follows:
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
...
-2
votes
1
answer
47
views
AJAX loading strange error while submitting data
Am using following code to create chat system and store data to txt file. it does what i need but there is a small error while submitting data, when i type text and hit enter AJAX loads data from file ...