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

212
Vistas
Is it possible to run PHP with JavaScript?

They say that It is not possible, but what about it? I was working on project to improve my skills and found a trick to run PHP from JS.

async function runphp() {
    const response = await fetch('phpfile.php');
    const data = await response.json(); //optional
  }

So we just make a request and all the code inside PHP will run. Also for eg. if we want just one function from PHP to run it is possible to make cookie in javascript, read it in php and run only some functions based on cookie value. I don't know anything about security and I'm working on localhost so the question is: Is it good if I add project with this on my website?

about 4 years ago · Juan Pablo Isaza
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