Position actuelle: Accueil> Catégories de fonctions> chmod

chmod

Modifier le mode fichier
Nom:chmod
Catégorie:Système de fichiers
Langage de programmation:php
Description en une ligne:Modifier le mode fichier.

Exemple

 <span class="token php language-php"><span class="token delimiter important"><? Php</span>
<span class="token comment">// Le propriétaire peut lire et écrire, et d&#39;autres n&#39;ont aucune autorisation</span>
<span class="token function">chmod</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"test.txt"</span> <span class="token punctuation">,</span> <span class="token number">0600</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>

<span class="token comment">// Le propriétaire peut lire et écrire, et d&#39;autres peuvent lire</span>
<span class="token function">chmod</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"test.txt"</span> <span class="token punctuation">,</span> <span class="token number">0644</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>

<span class="token comment">// Le propriétaire a toutes les autorisations, qui peuvent être lues et exécutées par tout le monde</span>
<span class="token function">chmod</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"test.txt"</span> <span class="token punctuation">,</span> <span class="token number">0755</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>

<span class="token comment">// Le propriétaire a toutes les autorisations, et le groupe où le propriétaire est situé peut être lisible</span>
<span class="token function">chmod</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"test.txt"</span> <span class="token punctuation">,</span> <span class="token number">0740</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>
Fonctions similaires
  • Synchroniser les données (mais pas les métadonnées) à un fichier fdatasync

    fdatasync

    Synchroniserlesdonné
  • Format l'entrée d'un fichier fscanf

    fscanf

    Formatl'entréed&
  • Renvoie la partie de nom de fichier dans le chemin basename

    basename

    Renvoielapartiedenom
  • Obtenez le temps de modification inode du fichier filectime

    filectime

    Obtenezletempsdemodi
  • Déterminez si le nom de fichier donné est un fichier normal is_file

    is_file

    Déterminezsilenomdef
  • Modifier le propriétaire du fichier chown

    chown

    Modifierlepropriétai
  • Former la ligne vers CSV et écrire sur le pointeur de fichier fputcsv

    fputcsv

    FormerlaligneversCSV
  • Renvoie les informations du chemin du fichier pathinfo

    pathinfo

    Renvoielesinformatio