1 Jan 17:36
Re: [FormBuilder] Current working directory affecting template path?
Norton Allen <allen <at> huarp.harvard.edu>
2007-01-01 16:36:48 GMT
2007-01-01 16:36:48 GMT
Steve, How did you specify the template file? If you specified a relative path: e.g. template => "foo.html", then it of course depends on the CWD. If you specified an absolute path: template => "/path/to/foo.html", then it does not depend on the CWD. This is basic filesystem stuff. -Norton Steve Knoblock wrote: >I am having trouble with an upload form. I define the form and on >submitted and valid, process an image, resizing and thumbnailing it. >In the process, I create hashed directories based on the user id, and >to create them > >cd foo >mkdir bar >cd bar >mkdir baz > >like that. But after I come back from this sub, and try to render the >confirmation page using $form->render() it fails on the template file >not found. I know the template file is there with correct permissions >and ownership and have traced the problem to this sub call. The >confirm page renders before the call and fails after it. The only >think I can think is C::FB or HTML::Template is depending on the >original CWD and when I change it, it loses its place. > >Should I be saving the CWD and restoring it on return from the sub? > >Thanks,(Continue reading)
RSS Feed