let's got file called test.php , can gather information using test.php?id=(id) . i'm using iis , i've managed remove .php extensions each file, shows test?id=(id) i'm wondering how have if want show test/id/(id) . not quite sure google in situation, that's why i'm asking here. hope can me out bit, appreciated. <?php $source_url="http://www.url.com/xyz/test.php?id=1234"; //to file name $url_info=pathinfo("http://www.url.com/xyz/test.php?id=1234"); if (!filter_var($source_url, filter_validate_url) == false) { //source_url valid url; $token_url = parse_url($source_url); //parameters of url $query = parse_url($source_url, php_url_query); parse_str($query, $output); echo $url_info['filename']."/id/".$output['id']; } ?>
i went across similar questions of renaming files in directory using python. i have these files in directory want rename: -statistical_analysis_with_r -statistical_pattern_recognition_3rd_edition -statistical analysis r -statistical pattern recognition 3rd edition for wrote script in windows: def naming(so): import re w=re.split('[ _]+',so) r=[] in w: r.append(i.capitalize()) print(' '.join(r)) import os c in os.listdir(os.getcwd()): if c.endswith(".pdf"): os.rename(c,naming(c)) print(os.listdir(os.getcwd())) but getting error: statistical analysis r.pdf traceback (most recent call last): file "<ipython-input-79-d7f645d6d3e5>", line 4, in <module> os.rename(c,naming(c)) typeerror: rename: can't specify none path argument can what's going on? and doing same thing using r (www.r-project.org)? loads of in advance. your naming functio...
i have used carrierwave users upload files in rails app. when user uploads multiple files of size more 400mb (approx.) timeout error. note: i've hosted app rails app on heroku. uploading large files through heroku not recommended. limit request 30 seconds , not enough time 400mb. if open using s3, heroku provides potential rails solution that.
Comments
Post a Comment