Saraswati Mohanty
Query: 22 / Answer: 25

18th Sep 2016 .

How to create a text file in php?


Answers

A. Mallick
Query: 23 / Answer: 32

18th Sep 2016 .

$filename = "/home/user/guest/newfile.txt";

$file = fopen( $filename, "w" );

if( $file == false )

{

echo ( "Error in opening new file" ); exit();

}

fwrite( $file, "This is a simple test\n" );

fclose( $file );


  •  Information
  • About Forum

    This educational forum is produly developed by betaQsolutions-A leading software company in Odisha. This forum is developed to discuss the educational topics only betweeen the Students, teachers, Parents & Experts. Topic related to Career, Syllabus, Subjects, Questions, Exams etc are allowed to discuss here.

  • Statistics

    Total topics 43 • Total Query 1115 • Total members 247 • Total Answered 1286