Probleme lecteur fichier txt en PHP sous Linux
Posté : 31 janv. 2012, 16:12
Bonjour,
j'avais créé une petite page PHP qui va lire dans des fichiers textes des données. Voici un exemple :
je vais lire le fichier texte sur un serveur distant dans un partage \\socvexp12\fmi\entree_parc_occupation.txt
* ENTREE PARC*/
$fentree_parc_occupation = file("\\\\socvexp12\\fmi\\entree_parc_occupation.txt");
$total = count($fentree_parc_occupation); // Nombre total des lignes du fichier
for($i = 0; $i < $total; $i++)
{ // Départ de la boucle
$entree_parc_occupation = $fentree_parc_occupation[$i];
} // Fin de la boucle
if(empty($entree_parc_occupation))
{
$entree_parc_occupation = "actualisation...";
Ensuite, j'affiche la variable :
<?php
echo "<b>$entree_parc_occupation</b>"
?>
Sous Windows, cela fonctionnait sans souci, depuis que je suis passé à Linux (ubuntu/apache), cela ne fonctionne plus dutout. Cela n'arrive pas à lire le fichier txt.
quelqu'un peut il m'aider ? merci
j'avais créé une petite page PHP qui va lire dans des fichiers textes des données. Voici un exemple :
je vais lire le fichier texte sur un serveur distant dans un partage \\socvexp12\fmi\entree_parc_occupation.txt
* ENTREE PARC*/
$fentree_parc_occupation = file("\\\\socvexp12\\fmi\\entree_parc_occupation.txt");
$total = count($fentree_parc_occupation); // Nombre total des lignes du fichier
for($i = 0; $i < $total; $i++)
{ // Départ de la boucle
$entree_parc_occupation = $fentree_parc_occupation[$i];
} // Fin de la boucle
if(empty($entree_parc_occupation))
{
$entree_parc_occupation = "actualisation...";
Ensuite, j'affiche la variable :
<?php
echo "<b>$entree_parc_occupation</b>"
?>
Sous Windows, cela fonctionnait sans souci, depuis que je suis passé à Linux (ubuntu/apache), cela ne fonctionne plus dutout. Cela n'arrive pas à lire le fichier txt.
quelqu'un peut il m'aider ? merci