I think you need to specify the full path rather than relative when using
fopen eg:

$file = fopen("/usr/local/apache/htocs/includes/about.inc", "r");

Chris

Alexander Wagner wrote:

> Tyler Longren wrote:
> > $file = fopen("includes/about.inc", "r");
> > $data = fread($file, 24000000);
> [..]
> > Any ideas why that doesn't work on one server but it will work on
> > another server?  The server it works on is Win2k, IIS5, php4.0.4pl1.
> > The server it doesn't work on is Linux, Apache, php4.0.4pl1.  Any
> > ideas why this won't work?  Just to be sure, I did a chmod 777
> > about.inc, so file permissions isn't it.
>
> I don't know why this wouldn't work on LAMP, but if you want to read a
> whole file you should do this:
> $data = implode('',file("includes/about.inc"));
>
> regards
> Wagner
>
> --
> "In place of infinity we usually put some really big number, like 15."
>  - Anonymous Computer Science professor
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**********************************************************************

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to