How to create empty file in scriptfiles folder programely
#1

How to create empty file in scriptfiles folder programely?
Reply
#2

Right Click > NEW> File
Reply
#3

:3 i mean script that create new file
Reply
#4

Код:
new File:CreateNewFile = fopen("FileName.txt", io_write);
fwrite(CreateNewFile, "");
fclose(CreateNewFile);
Reply
#5

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Код:
new File:CreateNewFile = fopen("FileName.txt", io_write);
fwrite(CreateNewFile, "");
fclose(CreateNewFile);
Not really, the fwrite is not necessary
PHP код:
new File:CreateNewFile fopen("FileName.txt"io_readwrite);
fclose(CreateNewFile); 
Reply
#6

Quote:
Originally Posted by NeXoR
Посмотреть сообщение
Not really, the fwrite is not necessary
PHP код:
new File:CreateNewFile fopen("FileName.txt"io_readwrite);
fclose(CreateNewFile); 
A safety check would be good in place, so if it fails you don't crash the server with fclose.

PHP код:
new File:CreateNewFile fopen("FileName.txt"io_write);
if(
CreateNewFilefclose(CreateNewFile); 
Reply
#7

And what would be the point? Can't you just create it when you need it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)