I’m trying to get the ACE editor to show wp-config.php for modifying throughout the admin space (writing a plugin to do that). I assume I have to specify the server path for file_get_contents() however it’s not working. Additionally, specifying the server path to the editor, as presently I’m utilizing the url. Any help could be enormously appreciated.🙏
<!DOCTYPE html>
<html lang="en">
<head>
<title>ACE in Motion</title>
<type sort="textual content/css" media="display screen">
#editor {
place: absolute;
prime: 0;
proper: 0;
backside: 0;
left: 0;
}
</type>
</head>
<physique>
<?php
$s = file_get_contents('var/www/html/wp-config.php');
?>
<div id="editor"></div>
<script src="https://sketchwhatyousee.com/wp-content/plugins/wp-config-editor/ace/src-min-noconflict/ace.js" sort="textual content/javascript" charset="utf-8"></script>
<script>
var s="<?= $s ?>";
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/php");
editor.session.setValue(s);
</script>
</physique>
</html>