i have asked question twice think, first time have gotten close this. planning on allowing users upload , download files (.pdf, .doc, .exl, .ppt, .png, .jpg, .gif). will these tips suffice: http://blogs.sans.org/appsecstreetfighter/2009/12/28/8-basic-rules-to-implement-secure-file-uploads/ also, there script can utilize, new php. a late response, think script should based on this: http://blog.insicdesigns.com/2009/01/secure-file-upload-in-php-web-applications/ it covers aspects of security , explains valid points. hope helps. edit: above link dead, here cached version of article .
i have 2d array have exploded string. once has exploded output: ---> 0 - 16~4~0.0~~~~false~~~~ ---> 1 - 1000.0~21.75~l~1~2.0~2.0~l~2~ ---> 2 - ---> 0 - 2~5~951.3~6.4~~~false~~~~ ---> 1 - 1000.0~11.77~l~1~ ---> 2 - ---> 0 - 3~6~1269.02~5.1~~~false~~~~ ---> 1 - 5.0~213.66~l~1~4.9~2.56~l~2~4.6~19.5~l~3~ ---> 2 - 5.1~53.44~b~1~5.4~8.48~b~2~5.5~15.53~b~3~ i want make each position in array takes first value before ~. unsure how this. code have far: $test = explode(":", $string); foreach($test &$value) $value = explode('|', $value); just in case need original string input: 1~1~828.32~12.5~~~false~~~~|1000.0~41.73~l~1~2.0~2.0~l~2~|:4~2~4.16~12.5~~~false~~~~|1000.0~21.75~l~1~2.0~2.0~l~2~|:9~3~0.16~24.0~~~false~~~~|1000.0~21.75~l~1~2.0~2.0~l~2~|:16~4~0.0~~~~false~~~~|1000.0~21.75~l~1~2.0~2.0~l~2~|:2~5~951.3~6.4~~~false~~~~|1000.0~11.77~l~1~|:3~6~1269.02~5.1~~~false~~~~|5.0~213.66~l~1~4.9~2.56~l~2~4.6~19.5~l~3~|5.1~53.44~...
how love regex! i have string mangled form of xml, like: <category>dir</category><location>dl123a</location><reason>because</reason><qty>42</qty><description>some desc</description><ipaddress>127.0.0.1</ipaddress> everything on 1 line, 'headers' different. so need extract information string above, putting dictionary/hashtable -- string mystring = @"<category>dir</category><location>dl123a</location><reason>because</reason><qty>42</qty><description>some desc</description><ipaddress>127.0.0.1</ipaddress>"; //this extract name of label in header regex r = new regex(@"(?<header><[a-za-z]+>?)"); //create collection of matches matchcollection mc = r.matches(mystring); foreach (match m in mc) { headers.add(m.groups["header"].value); } //this try , values. r = new regex(@"(...
Comments
Post a Comment