Re: file

From: Date: Fri, 28 Mar 2003 10:32:55 +0000
Subject: Re: file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141403@lists.php.net to get a copy of this message
On Friday 28 March 2003 18:26, Diksha Neel wrote: > i have a simple program to open and write a file. > but the file is not getting created. > can anyone please spot the mistake? > giving the code below. Turn on FULL error reporting so you can what errors (if any) there are in your code. > <?php > echo"hi?how are u doing??"; > $fp = fopen ("sandrew.html", "w"); > string="<html><head><title>hi</title></head><body>i am > > fine</body></html>"; > $contents=fwrite($fp,string); You need to use $string. > echo "'$contents'"; > fclose($fp); > ?> -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* A computer lets you make more mistakes faster than any other invention, with the possible exceptions of handguns and Tequilla. -- Mitch Ratcliffe */

« previous php.general (#141403) next »