Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

217
Vistas
Code structuring - How to include a file (JS, PHP, etc...) into HTML

how are you?

I want to structure my code as carefully as possible, but I don’t know how to do it. In a single file, I have PHP, JS and HTML code and I was wondering if it was possible to separate the contents by including their "path" in the html code.

For example, how I can separate the php code as well as the js code:

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   { js code }
   { php code }
</body>
</html>```

Thank you in advance for the information I would receive
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use '.php' file as default then just put html into that

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
     <script src="file.js"></script>
     <?php include('file.php') ?>
</body>
</html>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda