Sim Posted February 23, 2009 Share Posted February 23, 2009 // Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { $filename = ($rp_filename = $this->root . '/' . $filename) ? $rp_filename : $filename; $filename = dirname(__FILE__) . '/' . str_replace("./", "", $filename); } if (!file_exists($filename)) { die("Template->make_filename(): Error - file $filename does not exist"); } file is on my server. no matter what i try keeps DYING Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted February 23, 2009 Share Posted February 23, 2009 Re: file's never found. Just a head's up. If $filename is being requested as a $_GET method. You might want to secure your dirname() function. Quote Link to comment Share on other sites More sharing options...
Sim Posted February 23, 2009 Author Share Posted February 23, 2009 Re: file's never found. nevermind. forgot to upload my templates directory =) wow i feel dumb Quote Link to comment Share on other sites More sharing options...
Tonka Posted February 23, 2009 Share Posted February 23, 2009 Re: file's never found. nevermind. forgot to upload my templates directory =) wow i feel dumb everyone makes mistakes now and than Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.