Jump to content


Photo

Call to a member function on a non-object


  • Please log in to reply
3 replies to this topic

#1 hobojjr

hobojjr
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 03 September 2006 - 11:36 PM

get this error "Call to a member function on a non-object"

at this line

$d=dir(getcwd());
while (false !== ($entry = $d->read())) {

what gives?

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,025 posts

Posted 03 September 2006 - 11:55 PM

Does
echo getcwd();
give a value?
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 03 September 2006 - 11:59 PM

I think getcwd required chmod settings to high (755 or 777)
Try this as well
Tell me the problem, I will try tell you the solution

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 04 September 2006 - 01:15 AM

read the manual on getcwd() - namely the return type.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users