หมายเหตุ เอกสารนี้จัดทำโดย ลินุกส์ 8.0.1



ไม่สามารถเปิดได้ มัน error message ว่า
ของสถานะ server web ERROR
You don't have permission to access /awstats/awstats.pl on this server.
You don't have permission to access /sarg/ on this server.
import httplib, urllib
import base64, os.path
def imageToURL( aPath ):
# read the binary data of the picture
data = open(aPath, 'rb').read()
# encoded it to base64
encodedData = base64.encodestring( data )
headers = { "Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain",
}
params = urllib.urlencode({ u'fileName': os.path.split(aPath)[1],
u'data':encodedData})
conn = httplib.HTTPConnection( "localhost" )
conn.request( "POST", "/images/insert.php", params, headers )
response = conn.getresponse( )
# returns "True" or "False" if failed
print response.read( )
# status for debugging
print response.status
conn.close( )
if __name__ == "__main__":
imageToURL("tao09.jpeg")
ความคิดเห็นล่าสุด
11 hours 36 นาที ก่อน
11 hours 39 นาที ก่อน
11 hours 44 นาที ก่อน
11 hours 44 นาที ก่อน
12 hours 38 นาที ก่อน
14 hours 47 นาที ก่อน
15 hours 5 นาที ก่อน
15 hours 7 นาที ก่อน
15 hours 10 นาที ก่อน
17 hours 23 นาที ก่อน