Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!