X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=INSTALL;h=1f249070907a21295c5dd947d3f7e9ab5e372ec2;hp=32e8fe34c12771fb3f6fa86f827cb86c3f30ceda;hb=HEAD;hpb=236f0d7f8885c783714a24e03093530a3d183b7a diff --git a/INSTALL b/INSTALL index 32e8fe3..1f24907 100644 --- a/INSTALL +++ b/INSTALL @@ -1,38 +1,40 @@ -This directory must be accessible to your PHP files via the relative path: code/wfpl/ +Installing WFPL +=============== -The recommended way to do this is to create a directory named "code" in the -main folder of your website. And make symbolic links to that "code" directory -from all directories in your website where you run PHP. +Just unpack the file somewhere that php has access to. It's recomended to have +php at ``inc/wfpl/`` relative to your site php files, so you can use +wfpl_main() and files from metaform without modification. -Install wfpl within that "code" directory. That is, these files should be in a -directory named "wfpl" in the "code" directory described above. +Metaform +======== +Metaform is a code generator. Specifically, it generates the files that for a +web page with a form (which, optionally saves to a database, emails, etc.) -INSTALLING METAFORM on apache +You are free to use the installation of metaform here: -metaform.php unfortunately has a couple extra steps. +https://jasonwoof.com/metaform/ -1) make a directory (named "metaform" in this example) for metaform. +However, if you'd like to run your own (possibly modified) version, read on for +how to set up your own: -2) make sure code/wfpl is accessible in this directory (link to your main -"code" directory) as described above -3) make a symbolic link to metaform.php called index.php: +Installing Metaform on apache (OPTIONAL) +========================================= -ln -s code/wfpl/metaform.php index.php +Note: metaform is a code generator. It is NOT required to use wfpl. It is a +tool for auto-generating code for your site which makes use of wfpl. -4) make a file named .htaccess that looks like this: +You'll need some directives in your .htaccess: -RewriteEngine on -RewriteBase /metaform/ -RewriteRule .*\.tgz$ /metaform/index.php + php_flag register_globals off + php_flag magic_quotes_gpc off + AddDefaultCharset UTF-8 + RewriteEngine on + RewriteRule .*\.tgz$ /metaform/index.php -Note: the above .htaccess file assumes that the "metaform" directory you -created in step one is in the root www directory. If it's in a sub directory -(for example you access it via: http://example.com/my/sub/dir/metaform/) then -replace the two occurrences of "metaform" in the .htaccess file with the path -to that directory (for example "my/sub/dir/metaform"). +And a PHP file with: -5) If php can't write to /tmp then you'll have to fix the $tmp_dir in -code/wfpl/tar.php + require_once(__DIR__.'/'.'inc/wfpl/metaform.php); + metaform_main();