4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by GDICommander
0

My php firstpage <a href="http://localhost:8080/showcustomer?key=1234&path=host">click</a> My php showcustomerpage

$execute='C:\wamp\bin\apache\Apache2.2.11\cgi-bin\datesname.py';
$start =$_GET["key"];
$end =$_GET["path"];
$go = $start."=".$end."&path=".$end;
exec("$execute $go",$out);

My Pythonpage datesname.py

#!c:/Python27/python.exe -u


import cgi, cgitb, os, sys
import datetime
import logging
from urlparse import parse_qs
cgitb.enable(); # formats errors in HTML

sys.stderr = sys.stdout

query = os.environ.get('QUERY_STRING')
def get(self):
    data = self.request.get('path')
    print data

But i didnt get value

0

Confusion: The token self is a 'community standard reserved word': It is legal to use as a token, but everybody who codes in Python uses it as the first argument to member functions; and in classes to refer to the class instance it self... and for no other purpose. So your code seems meaningless to those of us who have been programming in Python for more than a few weeks, because we see self and our habits tell us to look for the rest of the class definition.

Your query variable holds a string. In Python, strings have member functions, but no attribute named 'request'.

Edited by happygeek: fixed formatting

0

Iam using django module

def get_full_path(self):
    data = self.request.get('path')
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.