Author: 永夜
-
Post Views: 52 The difference between echo(), print(), print_r() echo() is a language structure, no return value The function of print() is basically the same as echo(), and it is also a language structure. The difference is that print has a return value, and always returns 1 print_r is a recursive print for output array objects 2. What is the…
-
Post Views: 11 Final print code: print_r($_post); echo(date(y-. $_post[‘start_time’].-01 00:00:00)); echo(date(Y-M-T 23:59:59, strtoTime(date(y-. $_post[‘end_time’].)))); echo exit(); Print result: array ([CustomerRebate]=> array ([money]=> 1000[sale_uid]=> 31 )[start_time]=> 1[end_time]=> 10[yt0]=> confirm ) 2014-1-01 00:00:002014-10-31 23:59:59 Perfect support for reading the first day and last day of a certain month, that is, a certain time range!
-
Post Views: 14 If the array is an sequential array and starts from 0, such as: public static $service_gid = array(11430, 11431, 11432); Then Now At this time, through InArray, it will detect whether 11430 is in the array, and it will return 0; If public static $service_gid = array(2=>11430, 3=>11431, 4=>11432); Then At this time, through InArray, it will…
-
Post Views: 10 The implementation code is as follows: // uncheck the sorted line $(#checkout).live(Click, function(e){ if(!$(e.target).parent().hasClass(goods_row) ){ $(#checkout tr).removeClass(select-tr); } }); // sort, select the object to be moved $(#checkout .goods_row).live(Click, function(e){ if(!$(e.target).hasClass(goods_row) && !$(e.target).hasClass(goods_number) ){ var self = $(this); if(self.attr(merge_check) {//Set sales $(#checkout tr).not($(.+self.attr(merge_check))…RemoveClass(select-tr); $(.+self.attr(merge_check)).ToggleClass(select-tr); }Else {//Single product sales $(#checkout tr).not(self).removeClass(select-tr); self.toggleclass(select-tr); } } }); // exchange order…
-
Post Views: 14 The most initial code: $this->widget(zii.widgets.jui.cjuidatepicker, array( name=>mendtime, value=>date(Y-M-D, time()), Language=>yii::app()->getLanguage(), options=>array( showanim=>slidedown, changeyear=>true, changemonth=>true, showweek=>true, autosize=>true, dateformat=>YY-MM-DD, maxdate=>0, Mindate=>-10d, , HtmlOptions=>array( readonly=>readonly, class=>txt, Style=>width:200px ) )); Post-realization: Implementation process: 1. Extension download on the official website of yii:http://www.yiiframework.com/extension/datetimepicker/ 2. Copy the cjuidateTimePicker folder to the protected\extensions directory; 3. tohttps://github.com/trentrichardson/jQuery-Timepicker-Addon下载语言包,因为yii扩展中没有语言包; 4. Look in the file CJUIDateTimePicker.php: $CS->RegisterScriptFile($assets.self::assets_name..js,cclientScript::pos_end); add…
-
Post Views: 17 Screenshots of Makefile’s code: In the end, the reason was clear because the code written in Notepad on Windows first, although also used the <tab> key, still There is a problem. After re-editing it once in NetBeans, this problem is solved, and then the next problem is the next problem: the omission of the delimiter .…
-
Post Views: 8 By running setup-x86.exe, search the make keyword, and the list will be fully installed, and the final result is: Finally, run the make command again, and this prompt will not appear. The result: However, if the installation still fails to run, it may be a problem with the setup-x86.exe version. For example, if the version is…
-
Post Views: 10 The actual rules of the js function are: if (hasError == false) { return false; } else { return true; // If it returns true, the form submission operation will continue! }
-
Post Views: 11 View code: View interface: Post print after submission: Requirement: question_type is to be inserted into the database, as a string Solution 1, directly reset $_POST[‘QuestionOrder’][‘question_type’]: Reprint out the POST variable: Solution 2: The result is that both solutions can be inserted in the question_type problem type (1 replenishment, 2 exchange, 3 returns, 4 refunds, 5…
-
Post Views: 14 Since it is necessary to determine whether a value exists in this PHP array in JavaScript, you need to pass this PHP array into JavaScript! This effect can be achieved by using JSON-encoded variables using JSON_ENCODE – JSON encoded! Finally, use $.inArray(item.gid, js_goods_ids) == -1 to determine whether the value of this js variable exists in…