You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the newest version on @php-wasm/node installed 1.0.20 and there it says
Module '"@php-wasm/node"' has no exported member 'PHP'.
but the readme clearly says that this is the basic example:
import{PHP}from'@php-wasm/node';constphp=PHP.load('8.0',{requestHandler: {documentRoot: newURL('./',import.meta.url).pathname,},});// Create and run a script directlyphp.writeFile('./index.php',`<?php echo "Hello " . $_POST['name']; ?>`);awaitphp.run({scriptPath: './index.php'});// Or use the familiar HTTP concepts:constresponse=awaitphp.request({method: 'POST',url: '/index.php',data: {name: 'John'},});console.log(response.text);
The text was updated successfully, but these errors were encountered:
I have the newest version on
@php-wasm/node
installed1.0.20
and there it saysbut the readme clearly says that this is the basic example:
The text was updated successfully, but these errors were encountered: