Subversion Repositories Applications.framework

Rev

Rev 299 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 299 Rev 352
Line 7... Line 7...
7
 * @package	Utilitaire
7
 * @package	Utilitaire
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
9
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
10
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
10
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 
11
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 
12
 * @version	$Id: Fichier.php 299 2011-01-18 14:03:46Z jpm $
12
 * @version	$Id: Fichier.php 352 2011-07-21 10:25:56Z jpm $
13
 * @link		/doc/framework/
13
 * @link		/doc/framework/
14
 */
14
 */
15
class Fichier {
15
class Fichier {
16
	/** 
16
	/** 
17
	 * Créer et stocke du contenu dans un fichier.
17
	 * Créer et stocke du contenu dans un fichier.
Line 161... Line 161...
161
				}
161
				}
162
			}
162
			}
163
		}
163
		}
Line 164... Line 164...
164
		
164
		
165
		if ( ! $dossier_tmp) {
165
		if ( ! $dossier_tmp) {
166
			// Tentative de création d'un fichier temporaire
166
			// Tentative de création d'un fichier temporaire dans le dossier courrant
167
			$fichier_tmp = tempnam(md5(uniqid(rand(), TRUE)), '');
167
			$fichier_tmp = @tempnam(md5(uniqid(rand(), TRUE)), '');
168
			if ($fichier_tmp) {
168
			if ($fichier_tmp) {
169
				$dossier = realpath(dirname($fichier_tmp));
169
				$dossier = @realpath(dirname($fichier_tmp));
170
				unlink($fichier_tmp);
170
				@unlink($fichier_tmp);
171
				if (self::etreAccessibleEnLectureEtEcriture($dossier)) {
171
				if (self::etreAccessibleEnLectureEtEcriture($dossier)) {
172
					$dossier_tmp = $dossier;
172
					$dossier_tmp = $dossier;
173
				}
173
				}
174
			}
174
			}