I am trying to implement the canonical url and to combine with custom route classes. URL-SACAME is something like this: / category-x / article / 123 / category-y / article / 123 I am creating a custom route - the expansion of the class Zend_Controller_Router_Route_Regex and checks that the article is 123 and the correct category-name is included in the URL. If the article is in 123 square-X and the user is reaching square-y, then I want to redirect to the correct URL. But there is no clear possibility to do this directly to the roads. What is the best practice approach here? I often do this in my action controller like something ... // Get / Category-Y / Article / 123 $ $ article- & gt; URL is generated, and it contains / category-x / article / 123 if (this-> --request-> getRequestUri ()! = $ Article-> URL) {return $ this- & gt; ; _helper-> Redirector-> GoToUrl ($ paragraph-> url); } In this example, $ article-> The url will need ...
In anticipation of a live scenario, I am creating my entire site, which has a 500 MHz processor with 256 MB A very large 100 MHz RAM I have loaded my database with 200k + rows of garbage data, trying to test my queries. I have seen - obviously because of this, a large display hit all my FAQ using the index, although some 15+ to join (using all indexes) using MySQL To enable 16MB cache, which brings down the query times to nothing but what results? With a dynamic website, I can not see how the cache can help completely when I allow unique queries such as a search feature. I am also using the eaccelerator for PHP. When I use the COUNT (*) total with multiple code JOIN and WHERE , then 10 + There are other queries. Other queries that only get the same line or two do at the same level when I had only a few lines I also noticed that almost 99% of the CPU in CPU CPU stress during a query Comes. Basically I do not know whether the software is on the fault or too much of the h...
I am trying to write a simple invoicing system. I want to use the Datetime Diff to calculate the cost of each invoice. I have so far: / * In this example $ dayLength and $ ratePerSec is not really the case, but now we use the hypotethical values of 8.0 and 0.0054 Will * / $ date1 = new date time ("Time 1 Form Database", [DateTimeJonof Chase]); $ Date2 = new date time ("Time 2 Form Database", [Datetime Joneof Choice]); $ Diff = $ date2- & gt; Diff ($ date1); $ LenInSec = $ diff- & gt; Format ("% y") * 365 * $ dayLength * 3600 + $ diff- & gt; Format ("% d") * $ dayLength * 3600 + $ diff- & gt; Format ("% H") * 3600 + $ diff- & gt; Format ("% i") * 60 + $ diff- & gt; Format ("% s"); $ Cost = $ lenInSec * $ rate per second; When I try to output cost using $ lenInSec generated from the Deltaime Diff, I actually get weird results. Occasionally, in 1 and 3 out of 1 to 3 times, I get the...
Comments
Post a Comment