yep
i.e.
PHP Code:$TEMPLATEURL = "http://yourhost/tectite/template/";
PHP Code:$TEMPLATEDIR = "\\wepp\\conf\\domains\\abc6464\\nep\\wwwroot\\formmail\\template";
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
The formmail script indicates that in order to use templates you can
do
// ** OPTIONAL **
// Set TEMPLATEDIR to the directory on your server where template files are
// stored.
//
// If you want to specify "good_template", "bad_template" or "HTMLTemplate"
// in your forms, the templates must be found in the directory you specify
// below.
// This is a necessary step to prevent security problems. For example,
// without this measure, an attacker might be able to gain access to
// any file on your server.
//
// We recommend you set aside a particular directory on your
// server for all your templates.
//
// NOTE: on Windows servers, use '/' instead of '\' or double the
// '\' like this:
// "d:\\path\\to\\templates"
// or
// "d:/path/to/templates"
//
$TEMPLATEDIR = ""; // directory for template files; empty string
// if you don't have any templates
My question would be how exactly are u supposed to specify the path to the directory. Is it http://yoursite.com/fmtemplates or is it something else
yep
i.e.
PHP Code:$TEMPLATEURL = "http://yourhost/tectite/template/";
PHP Code:$TEMPLATEDIR = "\\wepp\\conf\\domains\\abc6464\\nep\\wwwroot\\formmail\\template";
Ok under the code for template directory I would put what you have indicated in the php code
$TEMPLATEDIR = " \\wepp\\conf\\domains\\abc6464\\nep\\wwwroot\\formmail\\template";
inside of both my formmail and formmail badhandle script?
yes, in both, formmail.php and fmbadhandler.php
but the path i've posted as "TEMPLATEDIR" is not exactly that which you can use
you have to change it to your server directory
to get your correct directory on your server:
- upload the attached "phpinfo.php" to your "template" directory on your server
- run it in your browser
- look after "_SERVER["DOCUMENT_ROOT"]" – it's rather at the end belonging to "PHP Variables" – or "_SERVER["SCRIPT_FILENAME"]"
"SCRIPT_FILENAME" quotes your exact path to the "phpinfo.php" file which you have uploaded just before
that's your path without the "phpinfo.php" at the end of it
after you have done this, you only have to quote it correctly with all the "\\" as described in formmail.php or like i've done in my example
that's it
On a apache server are the slashes suppossed to be forward or backward? And do I use single or double slashes
you want forwrd slashes - /
backslashes are just for windows
Yep, I'm sorry. I forgot that I had configured mine for a windows server.![]()
Hi Asket, thanks so much for your reply to my query..Originally Posted by asket
When I run the phpinfo file, I cannot find any of these variables, nor is there a section for phpvariables... Am I doing something wrong or have I a server that does not support this?
I am using a free host..
Thanks a lot in advance..
JaX
If you're using a free host I'd guess PHP might not be supported. At least most free hosts I know don't support it.
Well it does say free php, mysql databases etc.. on the homepage, and my mails seem to be working fine.... I just cant use templates..
I believe I just am not getting the templatedir setting correctly...![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks