“file_get_contents en JavaScript” Código de respuesta

file_get_contents en JavaScript

// You can use Fetch to get data.
fetch('http://example.com') // url here
  .then((response) => {
    return response.json(); // replace .json() to .text() for plain text
  })
  .then((daat) => {
    console.log(daat);
  });
Undefined

file_get_contents en JavaScript

//Or You can use php.js library. Which allow some php functions for javascript. 
//file_get_contents() function one of them.

<script>
	var data = file_get_contents('Your URL');
</script>

//You can find more info about php.js : http://phpjs.org/
Noob Learner

Respuestas similares a “file_get_contents en JavaScript”

Preguntas similares a “file_get_contents en JavaScript”

Más respuestas relacionadas con “file_get_contents en JavaScript” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código