$files = array(
"README" => "These files are meant to work with wfpl.\n\nSee: http://sametwice.com/wfpl\n",
".htaccess" => make_htaccess(),
- "config.php" => "<?php\n\nrequire_once(__DIR__.'/'.'inc/wfpl/main.php');\nmetaform_main();\n",
+ "config.php" => "<?php\n\n# put your site-wide configuration here\n",
+ "wfpl_main.php" => read_whole_file(__DIR__.'/'.'metaform/wfpl_main.php'),
"styl.styl" => read_whole_file(__DIR__.'/'.'metaform/styl.styl'),
"template.html" => read_whole_file(__DIR__.'/'.'metaform/site-template.html'),
"$admin_name.html" => make_html(),
# Unfortunately, the rewrite rules only work with absolute paths, so if your
# files are not at the top level of the domain, you'll have to customize this
# part. Here's the config for running at the top level:
-RewriteRule ^[^/.]*$ /config.php [L]
+RewriteRule ^[^/.]*$ /wfpl_main.php [L]
# use this line instead if you have this (.htaccess) file and your php and html
# files in the ~form~ directory:
--- /dev/null
+<?php
+
+define('DOCROOT', __DIR__ .'/');
+define('INC_WFPL', DOCROOT . 'inc/wfpl/');
+
+require_once(DOCROOT . 'config.php');
+
+require_once(INC_WFPL . 'main.php');
+wfpl_main();