473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

file_get_contents & permission errors

196 100+
Currently working on a site that has user and admin access. Now basically im trying to use -

Expand|Select|Wrap|Line Numbers
  1. $file1 = file_get_contents($url);
  2.  
The file im trying to retrieve is only accessible via logining in as administrator which is fine cause i have administrator access.

Now if i directly type in what $url equals, for example -

Expand|Select|Wrap|Line Numbers
  1. //note this is an example url not real one.
  2. $url = 'http://www.google.com';
  3.  
I can access the page providing im logged in as administrator BUT when i try to retrieve the page and then echo it using file_get_contents function is does not allow it for some reason.

So i wondering what im doing wrong and if there is anything i can do to get around this problem.

Just so you know i can do an identical process in the members area (which also requires a login) that works. I seem to only be getting the error while logged in as administrator and trying to access the file.

Any ideas or help is greatly appreciated, thanks in advance.
Jul 6 '10 #1
1 2305
code green
1,726 Expert 1GB
echo it using file_get_contents function is does not allow it for some reason.
file_get_contents doesn't have an echo option.
What are you doing?
What is happening?
What is the error message?
Jul 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Alex Kouzemtchenko | last post by:
ok, I've got a peice of code that deletes folders, wether empty or non-empty and I keep getting these errors: Warning: rmdir(./modules/test/Copy of test/Random Folder) : Permission denied in...
12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
1
by: CSN | last post by:
I upgraded to 7.4 a few days ago and am getting these errors when importing dumps: "permission denied to set session authority" and "permission denied for schema public". Not all of the dump is...
0
by: Sushma | last post by:
CSiFtpConnection error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > __thiscall...
1
by: pontificator | last post by:
I am trying to access files in seperate 2 directories via an ASP.NET web app that are not within my web directory structure. I have given both the machine\aspnet and machine\iusr_machinename...
3
by: Barry | last post by:
I'm running php on linux. Oddly enough, there are files that I must parse with php where the file name contains one or more spaces. Permissions are set correctly, however file_get_contents returns...
1
by: prw8864 | last post by:
In the following code I am trying to create a new templete class (SVector) that is a linked list with the added functionality of an insert method that automatically places items in sorted order. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.