Welcome Guest, Not a member yet? Register   Sign In
Problem deleting file
#7

[eluser]Vicente Russo[/eluser]
[quote author="TheFuzzy0ne" date="1236464186"]Yes, assuming that files is a directory in the same directory as you're index.php file. Generally it looks nicer to do it like this:
Code:
unlink('./files/filename.ext');
[/quote]

I`ve made a post on my blog with a few tips on CI. One of them was exactly this "problem". But I didn`t know using ./ is actually the index.php path. So I made a new constant on index.php

Code:
define('FULLPATH', pathinfo(__FILE__, PATHINFO_DIRNAME));

So if you`r right, and probably true, my constant is unecessary. Just for the record, my post with other tricks: blog post

V.


Messages In This Thread
Problem deleting file - by El Forum - 03-07-2009, 09:59 AM
Problem deleting file - by El Forum - 03-07-2009, 10:06 AM
Problem deleting file - by El Forum - 03-07-2009, 10:13 AM
Problem deleting file - by El Forum - 03-07-2009, 10:16 AM
Problem deleting file - by El Forum - 03-07-2009, 10:16 AM
Problem deleting file - by El Forum - 03-07-2009, 10:21 AM
Problem deleting file - by El Forum - 03-13-2009, 04:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB