@wp-playground/blueprintsInterfacesRunPHPWithOptionsStepSur cette pageRunPHPWithOptionsStep Runs PHP code. When running WordPress functions, the code key must first load wp-load.php and start with "<?php require_once 'wordpress/wp-load.php'; ".@hasRunnableExample@example<code>{ "step": "runPHP", "options": { "code": "<?php echo $_SERVER['CONTENT_TYPE']; ?>", "headers": { "Content-type": "text/plain" } }}</code>Index PropertiesoptionsstepProperties optionsoptions: PHPRunOptionsRun options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))stepstep: runPHPWithOptions
Runs PHP code. When running WordPress functions, the
code
key must first loadwp-load.php
and start with"<?php require_once 'wordpress/wp-load.php'; "
.