I wrote an import routine for pulling stuff from a csv file in version
1.3 and it worked perfectly. I have since upgraded to version 2.0
and I cannot get the same code to work. I have tried adding File to
the App:uses and App:imports but this doesn't change anything.
Folder was a second test just to see if I was doing something stupid
but no change in the error.
Thanks for any help.
Cheers
Chris
Code is:
function import() {
$output = "Importing `teachers.csv` from /app/webroot/
files/.<br />";
$path = WWW_ROOT."files/teachers.csv";
$handle = new File($path);
if ($handle) {
... to end.
Error message is:
Fatal error: Class 'File' not found in /home/cims4sch/BITS-system/
version-003/app/Controller/UsersController.php on line 186
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php