purencool Posted December 2, 2011 Share Posted December 2, 2011 Hi phpfreaks, I don't know I can't seem to get the $this->updateFilename to work the first piece of code works beautifully 'version1.tar.gz' came from the copy and pasting of the echo trim($this->updateFile); the code below will not work and I can't work out why any suggestions?$this->updateFile;comes from a screen scrape that is the only thing I can think of that is different? echo trim($this->updateFile); $filename = 'version1.tar.gz'; echo "<br>". $filename." hello world<br>"; if (file_exists($filename)){ $filename = trim($this->updateFile); echo "<br>". $filename." hello world<br>"; if (file_exists($filename)){ Quote Link to comment https://forums.phpfreaks.com/topic/252283-i-dont-know-file_exist-issue/ Share on other sites More sharing options...
QuickOldCar Posted December 2, 2011 Share Posted December 2, 2011 You should have the directory/path to the exact location of the file $filename = '/path/to/version1.tar.gz'; http://php.net/manual/en/function.file-exists.php Quote Link to comment https://forums.phpfreaks.com/topic/252283-i-dont-know-file_exist-issue/#findComment-1293425 Share on other sites More sharing options...
purencool Posted December 3, 2011 Author Share Posted December 3, 2011 thanks I don't know what I was thinking. I should of know that Quote Link to comment https://forums.phpfreaks.com/topic/252283-i-dont-know-file_exist-issue/#findComment-1293829 Share on other sites More sharing options...
Errant_Shadow Posted December 3, 2011 Share Posted December 3, 2011 This problem is solved then? Quote Link to comment https://forums.phpfreaks.com/topic/252283-i-dont-know-file_exist-issue/#findComment-1293844 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.