You can try replace $file = $this->site_url.'/app/webroot/files/daily.csv';
to $file = WWW_ROOT . '/files/daily.csv'; []s On 9/27/07, Conrad <[EMAIL PROTECTED]> wrote: > > > I am trying to create a .csv file from a table using fopen($file,"w") > to create it/open it. This csv will then later be downloaded and run > through a desk top check writing program, via an msaccess table. (not > my choice, but I didn't write the desktop application). > > I am getting the following errors: > Warning: fopen(http://www.trinityezpay.com/app/webroot/files/ > daily.csv) [function.fopen]: failed to open stream: HTTP wrapper does > not support writeable connections. in /home/trinity/public_html/app/ > controllers/process_controller.php on line 154 > > The code is as follows: > $file = $this->site_url.'/app/webroot/files/daily.csv'; > $this->file_error = 'Opened Daily.csv file successfully'; > $success = true; > if (is_file($file)) > { > unlink($file); > touch($file); > if (! chmod($file,octdec($mode))) > { > $this->file_error = "Won't chmod daily.csv"; > $success = false; > } > } // is file > if ($success) // if file open ok > { > if (!($fh = fopen($file,'w'))) --> this is the line with > the above > error. > -- > > This is legacy code converting to cake. It worked (at one time) as a > regular php program system. > > Any ideas? > > > > > -- ________________________________________________________ Thiago Paes - WebDeveloper - Linux user: #224062 site: http://www.thiagopaes.com.br --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
