Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ldougherty's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Do you have access to the error logs on your server? If so try looking in the error log to determine what is happening when you upload the file. One thing to ensure, in your php.ini the upload_tmp_dir should be specified and it should be a directory that is writeable.
  2. Depending what you are trying to do with the referenced file you can either call it via a full path or referenced path. If you are in /var/temp and you you need to access /var/file.txt you can either reference it is ../file.txt or /var/file.txt If the file(s) are web accessible you could use the URL like for linking images.
  3. So how exactly is your script supposed to work, you state something about "uploading a picture in a form in a separate page". Does the upload itself actually work or no? If you can give us the URL where you are running this script it might be helpful so we can see the code in action.
  4. Since you want the uploads to go into different directories based upon the user who is uploading you would need to identify that aspect prior to uploading. If you implement a login system you could set the upload directory based upon the user who is logged in. I do not believe there is any way with PHP itself to set the max folder size as this would be a file system manipulation. You could probably do some arithmetic prior to the upload to determine if it is within the allowed number. For example get the current directory size and store it in a variable then then the difference between the current dir size and the allowed dir size is what would be available to the user and if the upload is less than that number allow it. As for having a page that shows the uploaded files and size, this can be done many different ways but the simplest would be to have an index document that simply lists the files in the directory and if they are of image type to display them as images with whatever criteria you want to associate such as file size. Hope that gives you some direction.
  5. I've actually run this exact code on 3 different servers and on two the output was generated line by line where as on the 3rd the output was generated all at once. I'm honestly not sure of the difference other than possibly OS but everything else matched up exactly the same.
  6. You would have to use a static dimension for the image placement and relevant placement for the inputs. Essentially you create a DIV around the image centering it on the page and then use relative positioning of that DIV to place the inputs.
  7. If you do not supply an index it will just add the item to the end of the array. var[0] = 1; var[1] = 2; var[] = 3; outputting the array would yield 1,2,3
  8. echo "<pre>"; system ("ping -c4 $host"); system("killall ping");// kill all ping processes in case there are some stalled ones or use echo 'ping' to execute ping without shell echo "</pre>"; the 4 is how many ping requests to send and $host is the IP address/domain you wish to ping.
  9. How about just using INPUT boxes inside of DIVS positioned over the image at the right spot? You could add the style to the DIV so it looks just like that area hovering over the image... As for sending the information, just have the form submit to a page that generates an email to the email address you enter on the form and attach the PDF file to the message being sent. You could then store the email address however you want, plain text or database.
  10. Or if you prefer you can just use the system ping command using EXEC in your code. http://us3.php.net/manual/en/function.exec.php You can run any server command in your script via EXEC
  11. You are trying to combine 3 SQL queries into one query which is not how you do it. http://dev.mysql.com/doc/refman/5.0/en/update.html You need to adjust your syntax to update table itema = valuea, itemb = valueb where condition = terms;
  12. http://php.oregonstate.edu/manual/en/mysqli.close.php mysqli::close Closes a previously opened database connection. http://us.php.net/manual/en/mysqli-stmt.close.php mysqli_stmt::close Closes a prepared statement.
  13. So the file does upload without issue but you can't access it via the URL once uploaded right? What are the permissions on the uploaded file, it should be at least 644 to be web accessible. You can use chmod and chown via PHP to change the file permissions directly in your script or figure out why it's being uploaded with minimal permissions in the first place.
  14. You'll want to use the SUM function. http://www.tizag.com/mysqlTutorial/mysqlsum.php To return specific results in your query just use a WHERE clause to meet your needs along with DISTINCT to make sure you only get unique values. http://dev.mysql.com/doc/refman/5.0/en/distinct-optimization.html
  15. "As far as I know, you can't get spam listed if you send 100s of emails unless people are reporting you as a spammer" This actually is not entirely correct. Some mail servers also implement a rate limit meaning if you are hitting their mail servers with an excess amount of connections regardless of being legit mail or not the outbound server IP will be temporary blacklisted.
×
×
  • 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.