Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PHP] - fopen => Url du fichier "bizarre"

Featured Replies

Posté(e)

Salut à tous,

J'essais d'utiliser un fichier texte en php pour inscrire le nombre de visite dedans. Ce fichier ce trouve à l' adresse /home/sarvok/public_html/includes/compteur.cpt

Dans mon dossier includes, j'ai un fichier pied.inc qui contient les instructions suivantes :

$file="compteur.cpt";
$fp=fopen($file,"r+");

Sauf que de cette maniere ça ne marche pas ... Il faut bien que je précise

$file="/home/sarvok/public_html/includes/compteur.cpt";

pour que je pmuisse acceder au serveur ...

Sauf que lorsque le site sera sur internet, ce ne sera plus du tout la même adresse pour le fichier texte ... Comment je peux faire pour que ça marche à la fois sur le serveur et mon PC avec la même adresse ?

Posté(e)

et en utilisant l'include_path ?

fopen ( string filename, string mode [,[b] bool use_include_path [/b] [, resource zcontext]] )

Pour si tu mets ton fichier dans un rep definit dans l'include_path (qui sera different en production), tu peux mettre directement le nom du fichier a ouvrir sans le chemin complet... Il ira le chercher selon le positionnement de l'include_path

http://us3.php.net/manual/fr/ini.core.php#ini.include-path

http://us3.php.net/manual/fr/function.fopen.php

Modifié par Lestat666

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.