+ 1
How can i add .php file in a .html file?
11 Answers
+ 2
<?php include 'file.php' ?> or <?php require 'file.php' ?> if program will not found file - the second structure throws an error
+ 1
<?php include 'file.php'; ?> or <?php require 'file.php'; ?> Sorry, semicolon is required
+ 1
Try on PC. And don't forget to write some code in this file) You need an Apache server with PHP module)))
+ 1
one file save like .php (what you want to include), and the second like .html. If problem doesn't dissapear, try to change some settings in server
+ 1
Save them to server's root directory or /www folder
+ 1
I haven't expierence with xampp, but maybe you can find it in folder with this server or see this in settings of server. At least in Apache it's C:\apache\localhost\
+ 1
Ok 😂 i just forgot to install xampp or phpMyAdmin, i started Apache from cmd, so I don't know to work with this soft😂😂😂
0
It doesn't work
0
again nothing happend
0
yeah i am on pc and i run xampp.The php and html files where i have to save them?
0
how can i find server's root directory?