Grow your CSS skills. Land your dream job.

Chat room not working

  • __
    # August 19, 2014 at 9:43 pm

    Now i am deleting that file from my database if it is not what it is supposed to be. Is the file still a problem.

    No, you’re not.

    • imagedestroy works on image resources; it has nothing to do with files.
    • You are still saving the file to disk, before deciding if it is safe to do so.
    • None of the code you’ve shown involves a database at all.

    If you want to do this, here’s my advice: throw away all this code, and write out an outline of how you want the script to work using psuedo-code (“fake” code). There is enough going on here that you need to have a firm understanding of the process before you start trying to code it.

    Start with something like this, and start filling out the details. Again, not real code, just a description of what you’re doing. As you figure things out, add note of which functions you’ll need to use, what arguments you need to figure for them, and so forth.

    if( file was uploaded ){
    
        check file type
    
        if( file is an image ){
    
            create an image resource from it
    
            apply your filter effects
    
            save the resulting image
    
            (save the original file too?)
        }
    }
    
    # September 6, 2014 at 1:28 pm

    Hey chris i was just curious but is css-tricks your site.

    @chatroom Nope. This site belongs to @chriscoyier.

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".