I recieved this advice off-list:

-----------
You need to include() the file containing the scandir() function.

include '/path/to/file';

or if the file is in one of the dirs you've defined above you could use
the constant instead.

You can also define your include dir in php.ini or if running as an
apache mod in an .htaccess file.
------------

I had luck with the include approach:

  include 'c:/_Paul/web/phplib/utilities/dirfile.php';
  echo scandir();

I guess it'd be more wise to put in my php.ini to save a lot of trouble.


Thanks!


Paul Furman wrote:

I'm just barely beginning... but I have tried to research this...

As per instructions in the class I'm taking I set up several php library folders outside of public_html, one of which is

../phplib/utilities/

and inside that folder I've put a file scandir.php containing the function called "scandir()"

How do I call that function?
(I just have no clue, sorry!)
should I set it in my php.ini?
the class assumes we are running on their unix apache server

I've set up these directory shortcuts:
define ('LIBDIR', 'C:/_Paul/web/phplib');
define ('UTIL_DIR', LIBDIR . '/utilities');

the script is running under:
C:\_Paul\web\public_html

The class assumes we are running on their unix apache server but I'm running this on my own machine under win2k with an apache server I set up.

thanks!


echo (scandir())
Fatal error: Call to undefined function: scandir() in C:\_Paul\web\phplib\screen\home.php on line 8


echo (../phplib/utilities/scandir())
Parse error: parse error, unexpected '.' in C:\_Paul\web\phplib\screen\home.php on line 8


etc...

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



Reply via email to