Te sugerimos que revises esta respuesta en un entorno controlado antes de pasarlo a producción, un saludo.
Ejemplo 1: cargar php en html
//Safe as:
index.html
number.php
//HTML:
Home
Phone Number
include('number.php') ?>
//PHP:
4895553268;
?>
Ejemplo 2: enlace html
"https://www.google.com/">Visit googel.com!
Ejemplo 3: cómo vincular html con php
/* PHP code can be easily injected into a standard HTML page. As a rule,
* files with mixed content of that kind have .phtml extention. The workflow
* is the same as for pure .php scripts: one should setup web-server to
* handle .phtml files the same way it handles .php - .phtml should be passed
* to PHP engine, and the outcome gotta be sent to a visitor. PHP will parse
* the .phtml and process everything inside tags , ignoring the
* rest. I.e. the php code pieces in .phtml will be replaced in outcome with
* results of their processing, and HTML / CSS / JavaScript code in .phtml,
* as well as text content, will be displayed in browser as is. The one and
* only strict rule - your .phtml mixes must always start with PHP tag
* sequence , otherwise they won't be preprocessed by PHP engine.
*/
/**
* @category Template
* @package Hello_World
*/
$tpl = 'Hello %s!';
?>
"en">
printf($tpl,'World'); ?> >
printf(
$tpl,'world of ' . date('Y') . ', the wonderful future world'); ?>
Te mostramos las comentarios y valoraciones de los usuarios
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)