strange behaviour of file_get_content - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: strange behaviour of file_get_content (/showthread.php?tid=1124) |
strange behaviour of file_get_content - yojoe - 2010-11-15 hello I'm trying to convert a function I'm using to get page excerpt into a plugin. I've got some problems with it In plugin's code when I use $loaduserfile = @file_get_contents('data/pages/'.$page.'.xml'); and echo the output, I get only content of <pubDate> part of xml file (example: Mon, 15 Nov 2010 10:41:09 +1030) and not even 1 char more, while function placed in theme/functions.php works fine. Using $loaduserfile = @file_get_contents(GSDATAPATH.$page.'.xml'); doesn't load file. Is there any explanation ? strange behaviour of file_get_content - Carlos - 2010-11-16 yojoe Wrote:In plugin's code when I use Look at the source of the output, you'll see the full xml file. Or try this: echo htmlspecialchars($loaduserfile); yojoe Wrote:Using Use GSDATAPAGESPATH instead ;-) strange behaviour of file_get_content - yojoe - 2010-11-16 hmmmm....I'm not a pure dev, so I thought I'd get a plain char to char output, and I'll be able to see it as it was fetched.Then I'll see what I can do with it to make it useful. Thx for a hint about gsdatapagespath, again I don;t $&%(! know why I haven't noticed it on list of constants :\ I feel I have all needed info, and will accomplish v0.00...1 of the plugin. |