Question:
How to execute php commands from a .html file?
VAL
2012-06-23 08:10:13 UTC
I am in ubuntu 10.04. I want to execute php script from my index.html file. I was advised to make corrections in .htaccess file. But I dont find any such file in the system. Which is the directory of .htaccess file? What corrections are to be made in this file?
Three answers:
.
2012-06-23 08:17:37 UTC
You have to create the .htaccess file if it's not there (it's simply a text file), and it goes where your main index page lives.



To execute php in a html file, you need to use the directive AddHandler and it would look like this:



AddHandler application/x-httpd-php5 .html .htm



Might want to google add handler though. Not sure that works anymore - it's from an old site.
?
2016-11-29 10:55:43 UTC
information superhighway servers won't run "device" calls indoors CGI scripts, via utilising reality it incredibly is a very good maintain practices hollow, or maybe an green hacker can use it to hijack your pc. attempt utilising the "Taint replace" ( -T ) (Google it) and if it components an errors, you will ought to desire to wrap the Java call in yet yet another function that could not promptly on the information superhighway internet site, ideal of all, convert your Java utility to Perl.
jok3r
2012-06-23 08:20:44 UTC
You need apache installed on your ubuntu computer.

Then you can execute php scripts between tags below;



For install apache try apt-get install apache at ur terminal






code here



?>


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...