Aller au contenu principal

RunPHPWithOptionsStep

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

Properties

Properties

options

options: PHPRunOptions

Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))

step

step: runPHPWithOptions