Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: From php to perl + template solution

by moritz (Cardinal)
on Jul 13, 2010 at 08:03 UTC ( #849183=note: print w/ replies, xml ) Need Help??


in reply to From php to perl + template solution

Now with the use of Perl + templates how the same thing is suppose to work?

You retrieve the previous counter value, increment it, and store it again. Then you pass the new counter value to the template engine, let it render the template, and print the result.

Perl 6 - links to (nearly) everything that is Perl 6.


Comment on Re: From php to perl + template solution
Re^2: From php to perl + template solution
by Nik on Jul 13, 2010 at 08:43 UTC
    That what i want to do, but those stuff take place inside perl script code. If the user request a web page from my website, how the index.py will be called with that webpaeg request as parameter so that it know for WHAT webpage he need to add, display counter?

    I have no php code any more inside my html pages, just pure html code made from dreaweaver that the uyser clicks on them. How all the above take place?
      If the user request a web page from my website, how the index.py will be called

      Are you sure you're still talking about the same problem as before? Do you really need to mix perl, python and php?

      And can you not actually avoid calling an external program, and do the counter updating in Perl? If not, what prevents you? <bllockquote> so that it know for WHAT webpage he need to add, display counter?

      Usually by passing command line arguments, or setting environment variables. But of course that depends on how the called script expects to get its arguments.

      Perl 6 - links to (nearly) everything that is Perl 6.

      Seriously, did I wake up in 1994 today? A page counter? You've posted several times over the years about such things. Again your post seems to be about basic coding problems which aren't language/technology specific, others have already given you the pseudocode you need to implement. Consider installing something like awstats if you are concerned with site usage statistics.

        I have implemented it with Perl code in the past and with php code as well. But never with Perl + Template use. Thats what iam asking. Not code just the logic of it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849183]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2014-04-17 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (444 votes), past polls