Thanks your attention, i have find the problem caused error, the file path have 
to be inside of loacl folder, for example. i have file in 
/usr/local/temp/file.txt. when i write line in plug.config. the path have to be 
write like:/temp/file.txt. if i put path like: /usr/local/temp/file.txt. this 
will get "can't not load file " error.
Thanks again!
> Date: Thu, 17 Mar 2011 20:49:49 -0600
> From: zw...@apache.org
> To: dev@trafficserver.apache.org
> CC: ccai...@msn.com
> Subject: Re: Can't not load file (INKfopen issue)
> 
> On 03/15/2011 05:40 AM, ChangCheng wrote:
> > Hi, i have tried the version v2.1.6,I still got same problem.could not load 
> > file.AnySuggestion?
> 
> So, I tried this in a plugin (and I also looked at the code), and it
> looks fine to me. I added this to a plugin of mine:
> 
> char buf[1024];
> TSFile f = TSfopen("/tmp/conf.config", "r");
> 
> TSfread(f, buf, sizeof(buf));
> printf("TSfopen() returns %d\n", f ? 1 : 0);
> printf("TSfread() read %s\n", buf);
> TSfclose(f);
> 
> 
> and when run, I see
> 
> TSfopen() returns 1
> TSfread() read CONFIG proxy.config.http.insert_request_via_str INT 0
> 
> 
> (which is exactly as expected).
> 
> -- Leif
> 
                                          

Reply via email to