Jump to content

gvp16

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by gvp16

  1. Hi, im looking to make the URLs for pages more seo friendly, i currently have something like this www.mysite.com/content/index.php?page=56543 and would like to make it look like this: www.mysite.com/content/56543/this_is_todays_news So the title of the page/article/information is in the url. Ive seen it done before and cant quite figure out how its done. Im looking for a nudge in the right direction. Thanks.
  2. excellent, thank you very much!
  3. Hi, ive got some code that extracts files from a zip file and puts them into a folder, how can i get the filenames of the files being extracted?? heres what ive got : $filename = $_FILES['file']['name']; $source = $_FILES['file']['tmp_name']; $type = $_FILES['file']['type']; $name = explode('.', $filename); $target = $_SESSION["folder"]."/files/images/".$r["name"]; // Ensures that the correct file was chosen $accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip','application/s-compressed'); foreach($accepted_types as $mime_type) { if($mime_type == $type) { $okay = true; break; } } //Safari and Chrome don't register zip mime types. Something better could be used here. $okay = strtolower($name[1]) == 'zip' ? true: false; if(!$okay) { die("Please choose a zip file, dummy!"); } //mkdir($target); $saved_file_location = $target . $filename; if(move_uploaded_file($source, $saved_file_location)) { openZip($saved_file_location); } else { die("There was a problem. Sorry!"); } } } Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.