05/12/2012, 17:51:38
j'ai envoyé le résultat à Robert
ImageManager.php
function _delFile($relative)
{
// echo "_delFile = ". Files::makeFile($this->getBaseDir(),$relative);
// If images/ _delFile = F:\Sites\Test\xxx\uploads\images/chrome_flash.png
// If images/test _delFile = F:\Sites\Test\xxx\uploads\images/test/chrome_flash.png
$r2 = Files::fixPath(dirname($relative));
echo 'r2 = '. $r2; // If images/ $r2 = \/ // If images/test $r2 = /test/
if( !$this->validRelativePath($r2) ) return false;
// SO return false -> If images/ and no file deleted
$fullpath = Files::makeFile($this->getBaseDir(),$relative);
echo 'fullpath= '.$fullpath;
// If images/test
// fullpath= F:\Sites\Test\xxx\uploads\images/test/chrome_flash.png
// OK file deleted
See / and \ into the links
Check also
function _dirs($base, $path)
{
$base = Files::fixPath($base);
echo ' base ='.$base;
// base =F:\Sites\Test\xxx\uploads\images/
// base =F:\Sites\Test\xxx\uploads\images/test/
you can see / after images
ImageManager.php
function _delFile($relative)
{
// echo "_delFile = ". Files::makeFile($this->getBaseDir(),$relative);
// If images/ _delFile = F:\Sites\Test\xxx\uploads\images/chrome_flash.png
// If images/test _delFile = F:\Sites\Test\xxx\uploads\images/test/chrome_flash.png
$r2 = Files::fixPath(dirname($relative));
echo 'r2 = '. $r2; // If images/ $r2 = \/ // If images/test $r2 = /test/
if( !$this->validRelativePath($r2) ) return false;
// SO return false -> If images/ and no file deleted
$fullpath = Files::makeFile($this->getBaseDir(),$relative);
echo 'fullpath= '.$fullpath;
// If images/test
// fullpath= F:\Sites\Test\xxx\uploads\images/test/chrome_flash.png
// OK file deleted
See / and \ into the links
Check also
function _dirs($base, $path)
{
$base = Files::fixPath($base);
echo ' base ='.$base;
// base =F:\Sites\Test\xxx\uploads\images/
// base =F:\Sites\Test\xxx\uploads\images/test/
you can see / after images
J-C Etiemble v 2.2.xx