Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
change
PHP Code:
$stoplist = "H:/xampplite/htdocs/worksheets/stoplist.txt";
to
PHP Code:
$stoplist = $_SERVER['DOCUMENT_ROOT']."/worksheets/stoplist.txt";
and
PHP Code:
getfiles("H:/xampplite/htdocs/worksheets")
to
PHP Code:
getfiles($_SERVER['DOCUMENT_ROOT']."/worksheets")
This will instruct PHP not to look in a specific directory, but to base the search into the root directory of your website.
Then, expand from there.
I often put uploaded files or sqlite db outside the htdocs realm, and use this code to reach them:
PHP Code:
$sqliteRoot=$_SERVER['DOCUMENT_ROOT']."/../sqlite/"; $fileUpRoot=$_SERVER['DOCUMENT_ROOT']."/../upload/";
__________________
Only a biker knows why a dog sticks his head out the window.
|