Jump to content

Minklet

Members
  • Posts

    88
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Minklet's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm trying to tidy up my code by getting to grips with OOP. I know that this isnt really OOP, but I want to put a cache system into a function. The bit in comments is basically the bit that I want to put into a function. As you can see its fairly rudimentary but basically I dont know how to get what 'include' produces into the output buffer because, of course, its not actually outputting anything. I thought something like fopen() but its all PHP scripts in the include so taht wont work Anyway, this is what I have: $cachefile = 'cache/cache_blogphotofeed.html'; $include = 'feeds/blogphoto_feed.php'; $table = 'our_photos'; if (file_exists($cachefile)) { if (is_outdated($cachefile, $table, $dbc)) { // This bit ob_start(); include($include); $fp = fopen($cachefile, 'w'); fwrite($fp, ob_get_contents()); fclose($fp); // close the file ob_end_flush();[/b] // To this bit } else { include($cachefile); } } else { ob_start(); include($include); $fp = fopen($cachefile, 'w'); fwrite($fp, ob_get_contents()); fclose($fp); // close the file ob_end_flush(); } The function is_outdated simply checks if the database table has been modified more recently than the cache file Any suggestions at all?
  2. Actually I said thankyou to those that tried to help, that included you. I also did post the solution. You appear to have missed out the first two sentences in my post.
  3. Strangely, despite adding it in the scripts, adding UTF-8 to htmlentities and changing the mysql charset did the trick. Thanks to the people who tried to help No thanks to the people who didn't (not one of you knew of a decent resource or even a place to find a freelancer?), I cant remember the last time I got some decent help on this forum. Sarcastic posting of the manual is usually the best I get, regardless of the question. Dev Shed helped me within an hour and 1 post, so kudos to them
  4. Still cant get this to work. Surely someone can point me to something to help me out? I refuse to believe that this issue is unfixable. These characters are handled fine by countless other sites, surely there is an answer. Like I said I can pay someone something (not much I'm a student). I might do a larry david and pay for just a response.
  5. Sadly didn't make a difference. One of the characters is an ampersand and is outputted as & How can there be a problem outputting this? Surely this is a clue? I'm actually willing to pay someone to help me now, so if anyone can come up with a reasonable offer to help me, give me a shout. PLEASE!
  6. Does anyone have ANY information about sanitizing (or whatever the term would be) text copied from websites into a text box? Because this could be worth an attempt to sort it out maybe. Seriously, no one can help me here?
  7. Sorry to keep bumping this but I really need to get this sorted and the stupid modify rules for posts on here mean i cant just add information to posts. It seems copying and pasting from other blogs, facebook and other sites into the text inputs for my site results in something that causes it to render them incorrectly For instance, this tracklist copied into the tracklisting field is fine http://forum.breakbeat.co.uk/tm.aspx?m=1972135876&mpage=1&key=shiverman But this one is not http://nottingham.subverb.net/blog/saltwater/ Despite being EXACTLY THE SAME I cant not allow my users to copy and paste from the main sites that they use and even the site that they are on! What is going on, can someone PLEASE help me here? There has to be something that I am doing wrong, either on the inputs or outputs - but I CANT FIND OUT WHAT
  8. Is there anything that might be going on at the server that I should ask about? But then, wordpress is working managing to display it absolutely fine. RSS validation is throwing this: Your feed appears to be encoded as "utf-8", but your server is reporting "US-ASCII" and 'utf8' codec can't decode byte 0x96 in position 3657: unexpected code byte (maybe a high-bit character?) The character in question is just a dash, that is actually being displayed fine when rendered as content. F*cksake.
  9. This is still not working and it is even breaking RSS feed. Does anyone have ANY information or ideas where I can get some? This is actually driving me insane
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Tried charset=iso-8859-1 and it managed to display the ••• characters correctly, but still not correct on the ones I posted above
  11. It's running from the same server and it's the same database
  12. P.s. this is the series of characters that are throwing up a question mark ∷∷∷∷∷∷ and these ○○○ and they aren't in the UTF-8 table, so does that mean I should be using a different encoding? Which wouldn't make sense because that is what the wordpress pages are using.
  13. I've just tried copying the contents of the field directly from phpadmin into my text editor and it pasted the dodgy characters as question marks, so this is even before it gets to browser there is a problem, does this mean anything? The database is in utf8_general_ci Apparently that's just my text editor, as copying and pasting into a text field on another website displays the characters correctly. I'm getting seriously annoyed by this now.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.