Skip to content

Instantly share code, notes, and snippets.

// A simple text editor implemented in Java using JFrame
import java.awt.Font;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.io.BufferedWriter;
import java.io.File;
<?php
class Template {
public static $vars = array();
public static function bind($key, $value) {
self::$vars[$key] = $value;
}
public static function render($name) {
$contents = file_get_contents($name.".php");