Forum Moderators: coopster
I have a PHP script that uses
fopen("$filename");
I want to use this script in multiple directories on my site, however, it seems like I have to have a copy of "$filename" in every directory to get it to work.
I have tried fopen("/filename")
fopen("http://mysite.com/filename")
and none of these seem to work, I always get a file does not exist error, until I drop the "filename" file into the directory where the script is being run.
Any ideas how I can make this work so I don't have to have dozens of "filename" all over my site?
THANKS
$handle = fopen("<file location here>", 'r');// or write, w/e
I'd say check the location of the file and make sure you didn't leave out a directory when specifying where it is....
--Nick