Jump to content

Cognito

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Cognito's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. exec will work on windows but only for CMD options you would need to have a command line winzip installed.
  2. Execuse any messy code im still a newb and only been messing around with php for about 1yr I'm sure half the way I code things can be done alot easier.
  3. Good point! only works on a linux server tho....
  4. you need to add some code to check to see if the user_id already exists in the database. if it does you need to use a replace statement in your sql query else you need to use insert. Hope that helps.
  5. My way would be to use a dynamic include - <? include("'$page'.'html"); ?> and then call yourdomain.co.uk/index.php?page=aboutus There might be a more sensible way to do this Im just an amateur
  6. have a look into php templating. that way you will only have 1page but the option of 2values eng of fr heres an example: index.php <?php $lang = ""; include("variables.php"); if $lang = "EN"; { include("templateEN.html"); } else include("templateFR.html"); } ?> variables.php <?php $TPLEN["title"] = "This is Magic!"; $TPLFR["title"] = "This is Magic!"; $TPLEN["HEADLINE"] = "Hello"; // This is ENGLISH $TPLFR["HEADLINE"] = "Bonjour"; // This is FRENCH ?> templateEN.html <html> <head><title><?=$TPLEN["title"]?></title></head> <body> <H1><?=$TPLEN["HEADLINE"]?></H1> </body> </html> templateFR.html <html> <head><title><?=$TPLFR["title"]?></title></head> <body> <H1><?=$TPLFR["HEADLINE"]?></H1> </body> </html> You can then goto - http://www.yourdomain.com/index.php?lang=EN
  7. what i was trying to say is there is no php module or function I know that can unzip 4parts of 1big zip.... it only has the option to unzip .zip not .zip001 002 etc...
  8. Use: $selected_radio = $_POST['gender']; Where gender = your radio button's assigned name.
  9. dang that makes it really hard your using zip parts, i thought you had like x amount of zip files containing lets say chapters. I don't know anything in php that can unzip x amount of parts into a folder then rezip sorry
  10. I'll expand on my previous post: It is possible to insert almost any binary document into a blob type field but in most case i would suggest to store the document outside the database and to store the *address* of the document into the database. Blobs make database less efficient due to the variation they introduce in field length. A blobed (?) binary document also takes more space than the original one.
  11. You would need to do 2 things. Firstly extract the zips to a folder then use the tutorial above to put that folder contents back into a zip. <?php $zip = new ZipArchive; if ($zip->open('test.zip') === TRUE) { $zip->extractTo('/my/destination/dir/'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> I believe this only works on PHP4 havent tested on PHP5
  12. Not enough to pin point whats causing it mate sorry Can I suggest you add the code to a test.php file on your server and make sure that works ? as long as that works you can be 100% sure its drupal having some effect. If not it could be something to do with your php.ini setup.
  13. This should be what your after - http://www.phpit.net/article/creating-zip-tar-archives-dynamically-php/
  14. Most recruitment sites use the database to store the file name and sometimes location.... then all your CV's go into a upload folder and in order to get the links you pull them back out via a DB query.
  15. I should of just tested your code first Just put that code on my dev system here and it works perfectly fine, must be something to do with the drupal system some how overriding your value......
×
×
  • 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.