javascript - Server access to file with no client access -


so i'm trying make own password protection system site personal use, , i'm wanting steer clear of sql.

i'm no master of web languages.

the password of given page stored in text file same name, in different directory.

i've tried coding thing few times, , succeeded once. had working, found out files publicly accessible going right url.

i tried chmoding directory , file permissions owner only, thinking restrict access client. no effect.

i used web host's password protection system lock directory containing password files, required input of password whenever script called.

i tried prevent access files moving them above public_html folder, javascript not access them client-side.

php, see solution this, cannot figure out need exactly. php scripts run on first access of page, php not contained on same page original calling javascript (i don't know if possible mix 2 in file anyway). php need in separate file, , somehow need called function return? understand it, easy using "include" function pass data php file, , return pass calling javascript function.

so there current train of thought, guess; how can call separate php file return though function?

update else same issue: "post" method retrieves return value of php page in callback function.

regarding need (and not request), secure web pages using htaccess. allow password protect entire site without writing single line of code.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -