slid

slid supports this item

Supported

21 comments found.

Hi can you please help me on how should my code be for this to write to the file :

this is notify-me.php

// Path to file. Please make sure that the script has write permissions on this file. $STORE_FILE = $_SERVER[“DOCUMENT_ROOT”].”/notify-email-list.txt”;

My folder is /public_html/docs

how should my code be ?

Hi,

$_SERVER[“DOCUMENT_ROOT”] refers to your document root folder (the one specified in your web server configuration).

So if you want the notify-email-list.txt file to be in this root folder you can leave it as it is. Just make sure that the script has the right permissions to write the file (proper CHMOD).

Alternatively, you could specify the absolute path to the file. Something like: $STORE_FILE = ”/public_html/docs/notify-email-list.txt”;

Another thing you should take care of is disabling public access to this file from the web.

Kind regards, Sergey

by
by
by
by
by
by