I am trying to secure different files, mostly pdf, so only the person
suppose to see the file that was designed for that individual can see it. I
am using sessions to secure the actual web pages, but now I am trying to
secure non-php files. Here is where I need some help/clarification.
I was told to save the files outside the Web accessible directories. Is
this the directory before /www/ so would look like /home/domain/ and I would
save it in domain?
My second question is, the person gave me some code that looked like this...
<?php
$path_info = explode('/', $_SERVER['PATH_INFO']);
$file_id = intval($path_in fo[1]);
download_file($ file_id);
?>
I am a newb it seems because I can't figure it out even after looking up
explode and intval on php.net .
Thanks,
Wes
suppose to see the file that was designed for that individual can see it. I
am using sessions to secure the actual web pages, but now I am trying to
secure non-php files. Here is where I need some help/clarification.
I was told to save the files outside the Web accessible directories. Is
this the directory before /www/ so would look like /home/domain/ and I would
save it in domain?
My second question is, the person gave me some code that looked like this...
<?php
$path_info = explode('/', $_SERVER['PATH_INFO']);
$file_id = intval($path_in fo[1]);
download_file($ file_id);
?>
I am a newb it seems because I can't figure it out even after looking up
explode and intval on php.net .
Thanks,
Wes
Comment