Why it's different?
echo date("w",strtotime(date("Y-m-d"))); echo date("w",strtotime(date("Y年m月d日"))); Save it as utf8.You'll see the second is bigger than the first one. ...
echo date("w",strtotime(date("Y-m-d"))); echo date("w",strtotime(date("Y年m月d日"))); Save it as utf8.You'll see the second is bigger than the first one. ...
hi, i'm trying to use json_decode to combine a few json objects and then re-encode it. my json looks like: { "core": { "segment": [ { "id": 7, "name": "test1" }, { "id": 4, "name": "test2" } ] } } ...
I notice that there are a few common ways to setup RewriteRules for MVC based PHP applications. Most of which contain: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d Followed by a RewriteRule: RewriteRule ^(.*)$ /index.php?$1 [L,QSA] or RewriteRule .* /index.php/$0 [PT,L] ...
Is there a way to draw a 3D Bar Graph using the pChart library in PHP? I'm able to draw a 3D Pie graph but not a line graph. Any help would be appreciated. My code looks as follows //The 3D bar graph # // Dataset definition $DataSet = new pData; // $DataSet->AddPoint(array(10,40,30,20,30,30,20,10,10,70,40),"Serie1"); $DataSe...
In my include_path on the server-side I have a reference to a pear directory, in '/usr/share/pear/'. Within my applications I include files from a common library, living in '/usr/share/pear/library/' with require_once 'library/file.php'. I've recently started using the spl autoloader, I noticed in the loader function you have to determ...
Hi, I really need an answer to this question. I am working on a project which uses XML to make pages, then XSLT to produce it to a web page. Here is a code sample: public function transform ($xml) { $proc = new XSLTProcessor; $proc->importStyleSheet ($this->xsl); $output = $proc->transformToXML ($xml); return $output; } the...
I've come across a Registry Class and I'm wondering whether to bother with this or just go constants, or are there separate uses for site-wide global variables such as database connection information, website URI, etc? Here's the class I came across: <?php Class Registry { private $vars = array(); public function __se...
The CMS I'm working with uses actual html comments around sections in an xml file to determine what is editable. I'm wondering how this is normally done in other CMSes. Example: /about.xml: <image><!-- :region editable="true": --> <image src=foo.png> <!-- /region/ --></image> <content> <p>some non-editable html</p> <!-- :region editab...
Hello i am learning comet and i am facing problem since most of the online tutorials about comet contains js prototype so can you convert this code into long polling.... thank you... -pradeep //This is my js var xmlhttp function ajax(str) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support AJAX!...
So far I'm re-inventing the wheel here in the most uncomfortable way. I can feel in my gut that this will break one day and cause me a lot of pain. Therefore I'm looking for a better way to take an article alias and build either the menu item url or the article url. Are there no joomla api calls that make this easier/cleaner/more futu...
Hello, I am a PHP beginner. I have developed a social networking website similar to Orkut in PHP. The basic program flow of my website is redirect everything to index.php The index.php determines the $_SERVER['REQUEST_URI'] and does what needs to be done and render the output. I initiaze all the classes at the top of index.php I want ...
I know that PHP4 is "dead", however there are about two dozen or so of our clients that still are located on servers where PHP4 is used, and we won't get any server upgrades until around a year or two. I'm just about to start working on refactoring and improving our core web framework, which is now coded for the lowest common denominato...
in my edit function, i need to reselect for the field again to save it. how can i added a 'selected'=>$addresscountry field in my $form->select function?? this is my code.. echo $country->select('Address.txtother_country','Please Choose Your Country' which $country is 1 of the helper that include by the page, let user to selec...
I am looking for a solution to upload multiple files from browser to server. As of now the HTML pages are written in oracle HTTP toolkit (using oracle mod_plsql on Windows NT). Can someone suggest me solution to upload files from client side and process it in server. Solutions based on HTML, Oracle HTTP, PHP are fine. Links and suggesti...
[Duplicate of DateTime difference from two tables] Hi, I need to find the date time difference from 2 tables. My date time type is Varchar and the format is(d/m/Y H:m:s). How to find the datetime difference from 2 tables. ...
Symbols such as: ♫ http://www.chatsmileysemoticons.com/music-symbol-twitter/ So that I can do something like: $tweet = '♫'.$tweet.$play_song_url; ...
I have a form allowing a user to signup for a news letter which submits back to the page it's sat in for validation and adding the content to the db, however I also need to send an xml file to a third part using the information collected from the form to add to a mailing list. The data sent to the third party seems to need to be sent usi...
I pulled data from RETS server (Using one MLS) but now I am confusing ,If I will pull data using another MLS from another RETS server then that data will be differ from previous RETS data.I mean to say if I will pull RETS data from two different MLS then that data will differ or may be same and If differ then how it is differ?How two ML...
Hi all, If I have the following array: $Unmanaged = array( array('name' => 'SD2005', 'speed' => '1000', 'size' => 'desk', 'uplink' => 'no'), array('name' => 'SD2008', 'speed' => '1000', 'size' => 'desk', 'uplink' => 'no'), array('name' => 'SR2016', 'speed' => '1000', 'size' => 'rack', 'uplink' => 'no'), a...
There was a table in latin1 and site in cp1252 I want to have table in utf8 and site in utf-8 I've done: 1) on web page: Content-Type: text/html;charset=utf-8 2) Mysql: ALTER TABLE XXX CONVERT TO CHARACTER SET utf8 _ This SQL doesn't work as I want - it doesn't convert ä & ü characters in database to their multibyte equivalents Pl...