Kak na PHP sozdat noviy fayl?

TFcobra

Member
Joined
Nov 27, 2003
Messages
22
Reaction score
1
Age
42
Location
Baku
Website
www.tfcobra.nm.ru
Vsem privet!!!! tut vot kakaya dilema vishla......... ya ni kak ne moqu nayti funksiyu kotoraya sozdaet luboy fayl nezavisimo ot razresheniya... naprimer txt ili php fayl!!!

ya xochu na php proverit na nalichiya fayla, i esli netu fayla to sozdat eqo s chmodom777!!!

vot takaya vot problema!!!!
 

TFcobra

Member
Joined
Nov 27, 2003
Messages
22
Reaction score
1
Age
42
Location
Baku
Website
www.tfcobra.nm.ru
net tak ne poydet!!!!

esli netu nujnoqo fayla fopen() eqo ne sozdaet!!!! eto bivaet tolko v local servere!!! mne nujen php code chtob on sozdaval luboy fayl!!! fopen ne delaet!!!!!
 

apstar

Member
Joined
Apr 20, 2005
Messages
70
Reaction score
53
Age
46
Location
Киев
fopen(_url_file_,'w'); если нет файла то создаст
 

TFcobra

Member
Joined
Nov 27, 2003
Messages
22
Reaction score
1
Age
42
Location
Baku
Website
www.tfcobra.nm.ru
ya vse ponal!!!!!

problema bila v tom, chto papka v kotoroy doljno bilo rabotat fopen, doljna bit chmod 777 inache nikak!!!!

srabotalo!!! thanks vsem!!!!
 

Malay

Member
Joined
Feb 6, 2004
Messages
32
Reaction score
1
Location
Одесса
Website
www.sf.biz.ua
Учти, что без проверки на существование файла, ты его просто перезапишешь.
 
Top