8 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for timetraveller1992

I am trying to write a multiline string into a text file but it does not appear as multi-line text. Here's my code $hostname = "localhost"; $username = "root"; $password = "sample"; $dbname = "code"; $code = <<< THECODE ; This is the main configuration file for your web app …

Member Avatar for Lsmjudoka
0
256
Member Avatar for andreiviziru

so i have the following code and is not working // Make user folder if (!is_dir('../user/'.$name)) { $user_folder = mkdir('../user/'.$name, 0777); $user_index = copy('../login/user.php', '../user/'.$name.'/index.php'); if ($handle_append = fopen('../user'.$name.'index.php', 'w')) { echo 'Succes opening the file'; } else { echo 'Error opening the file'; die(); } $string = 'text to …

Member Avatar for andreiviziru
0
210
Member Avatar for PriteshP23

Hello Everyone..!! I am beginner at PHP. I would like to have solution for "\n" in textfile php. $file = "testFile.txt"; $fh = fopen($file, 'a+') or die("can't open file"); $firstname = $_POST["prenom"]; $lastname = $_POST["nom"]; $mood = $_POST["humeur"]; $datestring = date("d/m/y "); $timestring = date("H.i.s"); $data = "$firstname ; $lastname …

Member Avatar for PriteshP23
0
202
Member Avatar for reco21

Im grabbing a page with below. $homepage = file_get_contents('http://www.example.com/'); echo $homepage; How do I write it to a file.txt and overwite in the event the file exists ? Thanks.

Member Avatar for reco21
0
1K
Member Avatar for cjohnweb

I have a project that, instead of using MySQL, I am supposed to use txt files to manage data. I have no say in this, I'm doing the project for a client. So I wrote a test file with functions for writing these data files, reading, etc. But it's not …

Member Avatar for cjohnweb
0
170
Member Avatar for cigoL..:)

Hi, I'm currently working on a school project ..i was wondering if someone can help, i'm creating a system which get's data from a database and creates a CSV file ..i Google a lot none of it helps, i want to get several rows from a table and write it …

Member Avatar for cigoL..:)
0
669
Member Avatar for aaloo

plz somebody help with this code . i m fed up now [CODE]<?php $x=5; echo $x; session_start(); $_SESSION['y']=$x; $string = '<?php session_start(); $x=$_SESSION['y']; echo $x;?> '; $fp = fopen("6.php", "w"); fwrite($fp, $string); fclose($fp); ?>[/CODE]

Member Avatar for aaloo
0
261
Member Avatar for aero31aero

Everytime I run this program and enter a new record, it gets terminated on these statements: [CODE] stud.pcent=((stud.mhin+stud.meng+stud.mmat+stud.msci+stud.msst)*100)/(mm.hin+mm.eng+mm.sst+mm.sci+mm.mat); fwrite(&stud,recsize,1,file); [/CODE] The whole program is this. It is only partially complete. [CODE] #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<stdio.h> #define UARROW 72 #define DARROW 80 #define ENTER 13 #define ESCAPE 27 int key; …

Member Avatar for aero31aero
0
183

The End.