The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Chat room not working

  • This topic is empty.
Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
  • #179971

    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?)

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

    Nope. This site belongs to @chriscoyier.

Viewing 2 posts - 16 through 17 (of 17 total)
  • The forum ‘Back End’ is closed to new topics and replies.