PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > write in a fil log the result of one echo
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
write in a fil log the result of one echo

Réponse
 
LinkBack Outils de la discussion
Vieux 25/09/2007, 18h59   #1
artev
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut write in a fil log the result of one echo

if I have this code
<?php
if (VAR1) {echo "<!-- funz1()rint_r(xxxx);echo "-->"; }
?>

that make comments in html's page source;

how I can to achieve all in a file (and not send in html page) ?

and is also possible to make a file every day so not write always in same
file, but every day to make automatically a file where to write; ?
  Réponse avec citation
Vieux 25/09/2007, 23h35   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: write in a fil log the result of one echo

artev wrote:
> if I have this code
> <?php
> if (VAR1) {echo "<!-- funz1()rint_r(xxxx);echo "-->"; }
> ?>
>
> that make comments in html's page source;
>
> how I can to achieve all in a file (and not send in html page) ?
>
> and is also possible to make a file every day so not write always in same
> file, but every day to make automatically a file where to write; ?


You need to set the content type to the appropriate value. See the PHP
header() function.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 26/09/2007, 05h46   #3
Preventer of Work
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: write in a fil log the result of one echo

artev wrote:
> if I have this code
> <?php
> if (VAR1) {echo "<!-- funz1()rint_r(xxxx);echo "-->"; }
> ?>
>
> that make comments in html's page source;
>
> how I can to achieve all in a file (and not send in html page) ?
>
> and is also possible to make a file every day so not write always in same
> file, but every day to make automatically a file where to write; ?


You can use the php file functions.
http://www.php.net/manual/en/ref.filesystem.php
Open file for append
Write your stuff
Close the file

To make a new file every day, use the date function to create a filename
such as
20070925.log
without too much effort.

I would give you code, but only have a minute.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h09.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07365 seconds with 11 queries