{"id":1349,"date":"2023-03-19T09:58:38","date_gmt":"2023-03-19T01:58:38","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1349"},"modified":"2023-04-29T09:04:00","modified_gmt":"2023-04-29T01:04:00","slug":"open-source-mobile-application-statistical-analysis-system-cobub-razor-installation","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/open-source-mobile-application-statistical-analysis-system-cobub-razor-installation\/","title":{"rendered":"\u5f00\u6e90\u79fb\u52a8\u5e94\u7528\u7edf\u8ba1\u5206\u6790\u7cfb\u7edfCobub Razor\u5b89\u88c5\u8e29\u5751\u8bb0\u5f55"},"content":{"rendered":"<h2>\u4e3a\u517c\u5bb9PHP 7\uff0c\u4fee\u6539\u6587\u4ef6<\/h2>\n<ul>\n<li>1\u3001\/system\/core\/Router.php<\/li>\n<\/ul>\n<pre><code class=\"language-php\">if (is_dir(APPPATH . &#039;controllers\/&#039; . $segments[0])) {\n    \/\/2018-01-03 AppBlog.CN\n    $temp = array(&#039;dir&#039; =&gt; array(), &#039;number&#039; =&gt; 0, &#039;path&#039; =&gt; &#039;&#039;);\n    $temp[&#039;number&#039;] = count($segments) - 1;<\/code><\/pre>\n<p><!-- more --><\/p>\n<ul>\n<li>2\u3001\/application\/models\/PasswordHash.php<\/li>\n<\/ul>\n<pre><code class=\"language-php\">\/\/function PasswordHash ($iteration_count_log2, $portable_hashes)\n\/\/2018-01-03 AppBlog.CN\nfunction __construct($iteration_count_log2, $portable_hashes)\n{<\/code><\/pre>\n<ul>\n<li>3\u3001\/application\/libraries\/phpass-0.1\/PasswordHash.php<\/li>\n<\/ul>\n<pre><code class=\"language-php\">\/\/function PasswordHash($iteration_count_log2, $portable_hashes)\n\/\/2018-01-03 AppBlog.CN\nfunction __construct($iteration_count_log2, $portable_hashes)\n{<\/code><\/pre>\n<h2>\u82e5\u51fa\u73b0\u9519\u8bef\uff1aTable &#8216;applog_db.razor_users&#8217; doesn&#8217;t exist<\/h2>\n<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/cobub\/razor\/issues\/11\">https:\/\/github.com\/cobub\/razor\/issues\/11<\/a><\/p>\n<p>\u9996\u5148\u5220\u9664\uff1aapplog_db\u548capplog_dw\u4e2d\u7684\u6240\u6709\u8868\uff0c\u7136\u540e\u5206\u522b\u5bfc\u5165\/assets\/sql\/dbtables.sql\u548c\/assets\/sql\/dwtables.sql<\/p>\n<p>\u5728\u5bfc\u5165dbtables.sql\u548cdwtables.sql\u524d\uff0c\u9700\u8981\u8fdb\u884c\u5982\u4e0b\u4fee\u6539<\/p>\n<ul>\n<li>\n<p>1\u3001\u4fee\u6539dbtables.sql\u548cdwtables.sql\u7684\u8868\u524d\u7f00\u4e3arazor_<\/p>\n<\/li>\n<li>\n<p>2\u3001\u4fee\u6539dbtables.sql\u7684users\u8868\u521b\u5efa\u811a\u672c<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"language-sql\">CREATE TABLE IF NOT EXISTS `razor_users` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `username` varchar(50) COLLATE utf8_bin NOT NULL,\n  `password` varchar(255) COLLATE utf8_bin NOT NULL,\n  `email` varchar(100) COLLATE utf8_bin NOT NULL,\n  `activated` tinyint(1) NOT NULL DEFAULT &#039;1&#039;,\n  `banned` tinyint(1) NOT NULL DEFAULT &#039;0&#039;,\n  `ban_reason` varchar(255) COLLATE utf8_bin DEFAULT NULL,\n  `new_password_key` varchar(50) COLLATE utf8_bin DEFAULT NULL,\n  `new_password_requested` datetime DEFAULT NULL,\n  `new_email` varchar(100) COLLATE utf8_bin DEFAULT NULL,\n  `new_email_key` varchar(50) COLLATE utf8_bin DEFAULT NULL,\n  `last_ip` varchar(40) COLLATE utf8_bin NOT NULL,\n  `last_login` datetime,\n  `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `sessionkey` varchar(50) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=utf8  AUTO_INCREMENT=1 ;<\/code><\/pre>\n<ul>\n<li>3\u3001\u5220\u9664dbtables.sql\u4e2d <code>--$$<\/code> \u8fd9\u4e00\u884c<\/li>\n<\/ul>\n<pre><code class=\"language-sql\">--$$\n\nINSERT INTO `razor_user_permissions` VALUES <\/code><\/pre>\n<p>\u7ee7\u7eed\u5b89\u88c5\u76f4\u81f3\u5b8c\u6210<\/p>\n<h2>\u82e5 \u6211\u7684\u5e94\u7528 \u9875\u9762\u4e0d\u80fd\u6253\u5f00\uff0c\u51fa\u73b0\u5982\u4e0b\u9519\u8bef<\/h2>\n<pre><code>Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column &#039;applog_dw.pp.newusers&#039; which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by<\/code><\/pre>\n<p>\u89e3\u51b3\u65b9\u6848\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/blog.csdn.net\/qq_34707744\/article\/details\/78031413\">http:\/\/blog.csdn.net\/qq_34707744\/article\/details\/78031413<\/a><\/p>\n<h2>\u82e5 \u6211\u7684\u5e94\u7528 \u9875\u9762\u62a5\u9519\uff1aA non well formed numeric value encountered<\/h2>\n<p>\u4fee\u6539\u6587\u4ef6\uff1areport\/console.php<\/p>\n<pre><code class=\"language-php\">for ($i = 0; $i &lt; count($this-&gt;_data[&#039;androidList&#039;]); $i ++) {\n    $row = $this-&gt;_data[&#039;androidList&#039;][$i];\n    $this-&gt;_data[&#039;today_startuser&#039;] += $row[&#039;startUserToday&#039;];\n    $this-&gt;_data[&#039;yestoday_startuser&#039;] += intval($row[&#039;startUserYestoday&#039;]);\n\n    $this-&gt;_data[&#039;today_newuser&#039;] += $row[&#039;newUserToday&#039;];\n    $this-&gt;_data[&#039;yestoday_newuser&#039;] += intval($row[&#039;newUserYestoday&#039;]);\n\n    $this-&gt;_data[&#039;today_startcount&#039;] += $row[&#039;startCountToday&#039;];\n    $this-&gt;_data[&#039;yestoday_startcount&#039;] += intval($row[&#039;startCountYestoday&#039;]);\n\n    $this-&gt;_data[&#039;today_totaluser&#039;] += $row[&#039;totaluser&#039;];\n}<\/code><\/pre>\n<h2>\u82e5\u6307\u5b9a\u5e94\u7528 \u8f6c\u5316\u7387 \u9875\u9762\u62a5\u9519<\/h2>\n<p>application\/models\/conversion\/conversionmodel.php<\/p>\n<pre><code class=\"language-php\">function getConversionListByProductIdAndUserId($productid, $userid, $fromdate, $todate, $version = &#039;&#039;)\n{\n    $dwdb = $this-&gt;load-&gt;database(&#039;dw&#039;, true);<\/code><\/pre>\n<h2>\u7edf\u8ba1\u56fe\u8868\u6570\u636e\u4e0d\u663e\u793a<\/h2>\n<p>\uff081\uff09<code>application\/models\/product\/errormodel.php<\/code><\/p>\n<p>\u4e24\u5904 <code>pp.version_name = $version_name<\/code> \u6539\u4e3a <code>pp.version_name = &#039;$version_name&#039;<\/code><\/p>\n<p>\uff082\uff09<code>application\/controllers\/report\/productbasic.php<\/code><\/p>\n<pre><code class=\"language-php\">$ret[&quot;timeTick&quot;] = $this -&gt; common -&gt; getTimeTick($toTime - $fromTime);<\/code><\/pre>\n<p>\u6539\u4e3a<\/p>\n<pre><code class=\"language-php\">$ret[&quot;timeTick&quot;] = $this -&gt; common -&gt; getTimeTick(intval($toTime) - intval($fromTime));<\/code><\/pre>\n<p>\uff083\uff09<code>application\/controllers\/report\/console.php<\/code><\/p>\n<pre><code class=\"language-php\">$ret[&quot;timeTick&quot;] = $this-&gt;common-&gt;getTimeTick($toTime - $fromTime);<\/code><\/pre>\n<p>\u6539\u4e3a<\/p>\n<pre><code class=\"language-php\">$ret[&quot;timeTick&quot;] = $this-&gt;common-&gt;getTimeTick(intval($toTime) - intval($fromTime));<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u517c\u5bb9PHP 7\uff0c\u4fee\u6539\u6587\u4ef6 1\u3001\/system\/core\/Router.php if (is_dir(APPP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[336],"class_list":["post-1349","post","type-post","status-publish","format-standard","hentry","category-devops-base","tag-336"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1349"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1349\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}