The question: The title pretty much says it all. If I have something like (from PHP site examples): $xmlstr = <<<XML <?xml version=’1.0′ standalone=’yes’?> <movies></movies> XML; $sxe = new SimpleXMLElement($xmlstr); $sxe->addAttribute(‘type’, ‘documentary’); $movie = $sxe->addChild(‘movie’); $movie->addChild(‘title’, ‘PHP2: More Parser Stories’); $movie->addChild(‘plot’, ‘This is all about the people who make it work.’); $characters = $movie->addChild(‘characters’); $character … Read more
The question: <tag> Алекс М </tag> When I try to get the content of the following code using DOMDocument functions, it returns something like: ÐÐ»ÐµÐºÑ Ðœ I’ve tried setting DOMDocument encoding to different values (UTF-8, ISO-8859-1), using mb_convert_encoding, iconv and utf8_encode but without success. How can I get “Алекс М” instead of “ÐÐ»ÐµÐºÑ Ðœ” ? … Read more
In most web applications we need global var base_url. In cakephp to get base_url currently i put the following code on beforeRender method in app_controller.php
In API 1.0, we can use
I wonder if there is any good PHP script (libraries) to check if link are broken? I have links to documents in a mysql table and could possibly just check if the link leads to a the document, or if I am redirected to anther url. Any idea? I would prefer to do it in PHP.
I have 1000 images in a Folder, which has SKU# word in all the images. For examples
How can I check if a specific file exists on a remote server using PHP via FTP connections?
is there a way to create my own custom superglobal variables like $_POST and $_GET?
I have cacheable dynamic content made in PHP 5.1.0+. I already send the correct headers (including Last-Modified and ETag) to clients.
I’ve recently started work on a new project using PHP5 and want to use their PDO classes for it. The problem is that the MySQL PDO Driver doesn’t support rowCount() so there’s no way to run a query and then get the number of affected rows, or rows returned, which is a pretty big issue as far as I’m concerned. I was wondering if anyone else has dealt with this before and what you’ve done to work around it. Having to do a fetch() or fetchAll() to check if any rows were affected or returned seems like a hack to me, I’d rather just do $stmt->numRows() or something similar.