Jump to content

shiny_spoon

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    Canada

shiny_spoon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey guys and gals... I can only seem to find bits and pieces of the answer I'm looking for, so I figured I'd ask here! I was wondering if it's possible to create a ZIP file from an entire directory on the end users computer and then submit that same ZIP to a MySQL DB. So, to recapitulate step by step: Grab all files and folders recursively from a directory on the users end (let's say C:\ZipMe\*.*) Create a ZIP file (Or any other type of archive, really. Whatever is easiest!) with these files/folders Send the archive to a MySQL DB (blob field) If you don't feel like typing out the whole thing, anything pointing me in the right direction would be wonderful. Much appreciated!
  2. Hmm... It looks like it wants to work, but all three backgrounds just pile on top of each other at the top of the div. Thanks though! I'll tinker around with this and see if I can get a result out of it. Edit: I actually got it working by tinkering around with heights. Now my only problem is that the mid.gif appears through the corners of top.gif and bot.gif because they have transparencies. There's no way I can tell the middle element to start after x pixels and stop before y pixels, is there? I could always set a static background color so it doesn't show, but that would limit my layout a bit.
  3. No, huh? :-\ I suppose I could stick three divs together, add the title in the top one and add text in the mid section. Now if only CSS3 were standard I could just add three backgrounds to a single div.
  4. Hey guys, I could use a hand making this container box I'm working on. Its got three parts, we'll call them top.gif, mid.gif and bot.gif. I am trying to create a box where top.gif, and bot.gif are static and do not repeat, but mid.gif repeats Y as more content appears in the box. The catch is text has to be inside the entire container, and not just in the mid section. +------------------------------------+ | top.gif beginning of paragraph | +------------------------------------+ | middle of paragraph | | mid.gif middle of paragraph | | middle of paragraph | +------------------------------------+ | bot.gif end of paragraph | +------------------------------------+ I've tried a bunch of things including using <img> tags for the top and bottom images, but nothing seems to work out the way I want it to. Note that top.gif and bot.gif have curved corners, so having mid.gif repeat from top to bottom behind them is out of the question, unfortunately. Any advice? Thanks!
  5. I'm not entirely sure how, but I managed to get it up and running this morning. I re-installed PHP and re-created my whole server directory structure manually checking all the permissions. Seems alright now! What a headache that was...
  6. Yep. Always use long tags. I also gave short tags a try for kicks, but that wasn't it. Thanks for the reply though.
  7. Hey everyone, I've been Googling my face off all day trying to resolve this, but I simply haven't been able to figure it out. I've got a Linux based Apache 2.2/PHP 5 server running. The thing simply will not parse anything. It just spits everything out in plain text or sends PHP files as downloads depending on how I configure it. httpd.conf has the following lines in it: LoadModule php5_module /etc/httpd/modules/libphp5.so # *.php <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> # *.phps <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> This currently gives me the source code directly in the browser. Essentially the same thing I'd see if I were to open a PHP file in a text editor. I've also tried it with: AddType application/x-httpd-php .php Doing that sends the file to the browser as a download. If I actually save and open it (it's named <random stuff>.part), it contains the source code, once again. It's almost like the PHP module isn't being loaded at all. The problem with that theory is that Apache isn't reporting any errors on start-up. I'm beginning to think it's got something to do with permissions. I set the root web directories permissions to 777 though, so I don't know what's going on. Any advice would be greatly appreciated!
  8. Ahhh! I was pretty relieved to see some replies this morning! Although both of your code snippets worked fine on their own, I took parts of each of them and made a new function to suit my code perfectly. Huge thanks to both of ya!
  9. Hey all, I have the following information stored in an SQL DB: id -- inid -- name 1 -- 0 -- Dir1 2 -- 0 -- Dir2 3 -- 1 -- Dir3 4 -- 3 -- Dir4 5 -- 1 -- Dir5 It's basically a directory structure where "id" is the directory's id and "inid" is the directory id in which the directory is located (0 is root). How would I go about printing this to look something like the following: ../Dir1 ../../Dir3 ../../../Dir4 ../../Dir5 ../Dir2 ... I want the output to look like a proper, fully expanded directory structure of sorts! I'm sorry if there's a lack of clarity here, I've been screwing around for quite some time with this and I'm about ready to call it. Thanks in advance.
  10. Thanks for the example Caesar, I managed to get it working! Oh, and thank you for the alternative, saf. I find it much easier to understand than all the craziness going on in preg's.
  11. Hey all, I've always been a complete imbecile when it comes to preg functions. No matter how many tutorials I read or how many times I actually use it for simple searches, I never seem to get the hang of it. I'm at my wits end right now, so I figured I'd come on here and ask you all for some help! I'm parsing HTML files like so: $page = "http://www.location.com"; $page_contents = file_get_contents($page); preg_match_all("I have no idea what to put here! ", $page_contents, $result); I need to find the following pattern: <div class="className">(pattern goes here)</div> So basically anything within a certain div class. I've tried about two hundred possibilities and have gotten absolute nothing out of it! Hopefully one of you wise people can give me a hand! Thanks in advance!
  12. Your '&' is the problem. Try it like so: [code]<?php if ($user_array['flthrs'] > '25'){   $rank = 'Training Officer'; } elseif ($user_array['flthrs'] > '25' && $user_array['flthrs'] < '75'){   $rank = 'First Officer'; } ?> [/code]
  13. Is it possible to change the action="" property of a form on the fly using JavaScript? Basically something similar to: [code]onmouseover="this.classname='css'"[/code] ...but for action! :P Thanks!
×
×
  • 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.