Jump to content

Perfidus

Members
  • Posts

    87
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Perfidus's Achievements

Member

Member (2/5)

0

Reputation

  1. Yes, this works like a charm, but, why was it working previously in the other server? Which things have changed in the new one so I can take them in account for future developments?
  2. Unknown column '455875' in 'where clause' SELECT * FROM articles WHERE ref IN (455875,99854,33266) AND title LIKE '%coffe%' ORDER BY date DESC LIMIT 0, 50
  3. Hi there, I have been running a website with no problems in a shared server, recently I have moved the files to a cheaper one and I'm having some issues in my PHP, even though versions (php, mysql) seem to be equal or newer, one of those issues is the following; I have this query: SELECT * FROM articles WHERE ref IN (".implode(',', $articles).") AND title LIKE '%$search%' ORDER BY date DESC LIMIT $startvalue, $amount This used to work fine in my old server, now I'm getting this error: Where 455875 is one of the references in the array, why?
  4. Hi there, I'm writing an rss file to my server with this function: fwrite($handle, utf8_encode($somecontent)) $somecontent includes some text manually introduced and some pieces that come from a database: $somecontent = "Text with spanish tilde รก".$databaserow['moretext']; Why the manually introduced text doesn't look utf8 encoded? What I'm doing wrong? Thanks for your help!
  5. Sorry, I don't understand you. This is how my code looks, the fopen has nothing special on it, does it? Can you explain it to me? This code comes from the PHP manual ... if (is_writable($filename)) { if (!$handle = fopen($filename, 'w')) { echo "Impossible to edit"; exit; } if (fwrite($handle, $somecontent, '10000') === FALSE) { echo "Can't update file"; exit; } echo "file was updated"; fclose($handle); } else { echo "Problem writing to file"; }
  6. In my server, fwrite only works if I set an amount: fwrite($handle, $somecontent, '10000') //This works as long as the text is < 10000 fwrite($handle, $somecontent) //This only writes 3 or 4 characters. I have also problems with image uploading, the uploading process stops after some KB have been uploaded and they are not really much...
  7. Hello there, I'm generating a small RSS in a folder in my server, I have validated the xml with the W3C rss validator and it is ok, but when try to open it with outlook, it tries to agregate the feed and suddenly stops and says that there was an error conecting to the server... I have CHMOD the directory to 777 but still getting the same problem. Does this have something to do with server configuration or is just some outlook bulls%$t? thanks in advance!
  8. But it is writing only 3 chars!! What should it be? Somethin with the encoding (it is a utf8 file)? The chmod at the directory?
  9. I'm not doing anything special, I have just copied the code from the php manual and substituted the 'a' in fwrite for 'w' all I'm trying to do is to write write to a xml file. The problem is that I can only write 3 characters, in this case: "Com" $filename = 'myfolder/data.xml'; $somecontent = 'Come on write some stuff'; if (is_writable($filename)) { if (!$handle = fopen($filename, 'w')) { echo "Problem opening file"; exit; } if (fwrite($handle, $somecontent) === FALSE) { echo "Problem writing to file"; exit; } echo "The file have been written"; fclose($handle); } else { echo "Impossible to read the file"; }
  10. Yes, it is. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  11. Hi there! I'm using the load() function from jquery which uses ajax to load php inside a div in a document. This document has a tag for utf-8 encoding in it's correct place, so I thought that all the contents loaded inside the document will follow the rule: I WAS WRONG. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> I have seen my problem in lot's of forums but the answers given over them don't work for me. My php looks more or less like this: <?Php header ('Content-type: text/html; charset=utf-8'); if($condition = true) { ?> HERE GOES SOME HTML AND THIS IS WHAT I'M LOADING <? } ?> As you can see, I'm also adding a header to tell the PHP that it must be utf-8 encoded, but maybe because the content is outside the <? ?> tags, it is not afecting it, so I get weird characters in the document. How can I fix that?
  12. Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would like to add some meta to the website but the index file is just a bunch of classes and includes so I'm a little lost about where to find the correct file to add the meta tags... Can anybody point me in the right direction? Thanks a lot.
  13. Thanks a lot again Thorpe, so I will give it a try. Do you think it is worth / profitable to start using a framework considering the delay in projects it will supose till the developer gets use to it? Is the learning curve a big pain or smooth?
  14. Thank u very much Thorpe. Some days ago I was looking in to the Zend Framework documentation and I thought it saids somewhere that I have to change several things in the php.ini file, to which I have no access, but I guess I was wrong. By the way, will this framework uploading complicate or force me to alter all the programation in php that I have already done for the website? Thanks again.
×
×
  • 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.