Jump to content

[SOLVED] Cannot redeclare class ... on line ..


muckv

Recommended Posts

This is the error message I receive

 

Cannot redeclare class directory on line 8

 

<?php

/**
* @author bram vekemans
* @copyright 2008
*/

//line 8 below 
class directory{

var $dir;


function __construct($dir){
	$this->$dir = $dir;



}


function scan(){

$dirs = array();

	$resource_path = opendir($dir) or die('Dir openen gaat niet');
	while (($filename = readdir($resource_path)) != false) {

		if (is_dir($filename) && $filename != '.'&& $filename != '..') {

		   
		  	$dirs[] = $filename;

		}



}

closedir($resource_path);
return $dirs;

}


}





?>

Link to comment
https://forums.phpfreaks.com/topic/129530-solved-cannot-redeclare-class-on-line/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.