On Wed, Feb 19, 2003 at 07:27:02AM -0000, DIKSHA  NEEL wrote:
> 
> hi all,

Hi Diksha,

> $fp = fopen("\bdoi_change\sundar.html", "w");

Mind your slashes.  Is this PHP script running on a unix/Linux box, or
in MS Windows?  If it's unix, remember that a backslash is *not* the
characters used to identify directories.

> i am able to write to this file through my php page
> filecheck.php and even am able to read the written contents.
> 
> but when i enter http://192.168.0.1/bdoi_change/sundar.html
> in my internet explorer address bar, it says the page cannot
> be displayed.

Remember that from fopen()'s perspective, the root directory is whatever
is root to the web server's process.  And a URL's root directory is
the DocumentRoot directive in your Apache configuration.  If you have
pointed your DocumentRoot at your operating system's root directory,
then the above setup should work, but otherwise, you need to fopen() the
file relative to your DocumentRoot.

And check your web server's log files.  Apache will keep a log of every
HTTP request that's made.  That log will always tell you exactly what's
happening, and where the system is looking for files.

> the file permissions are "rw-r-r"

No they're not.  They might be "rw-r--r--", but not what you put.  When
you talk about file modes, it's safer to refer to them in octal.  So
"rw-r--r--" would be 644, and "rw-rw-rw-" would be 666.  Less confusion.

p

-- 
  Paul Chvostek                                             <[EMAIL PROTECTED]>
  Operations / Abuse / Whatever
  it.canada, hosting and development                   http://www.it.ca/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to