HuggieBear
Members-
Posts
1,899 -
Joined
-
Last visited
Everything posted by HuggieBear
-
You're on the right track. Take a look at the user comments on the readfile() manual page for more details. Regards Huggie
-
That version is too old, you'd need version 7.16.2 (I got this info from the cURL website) Regards Huggie
-
Did you read the link I sent? Try it around your $article text. It will remove newlines from the beginning of your string. Regards Huggie
-
There's a perfect example on the session_start() manual page... <?php // Function to see if the sessions started function session_started(){ if (isset($_SESSION)) { return true; } else { return false; } } // Start the output buffer so we dont create any errors with headers ob_start(); // Run the function to check to see if the session has been started if (session_started()) { echo 'The session has been started.<br />'; } else { // Without buffering, this would cause an error later when trying to start a session echo 'The session has not been started.<br />'; } //Start the session echo 'Starting Session...<br />'; // This would also cause an error session_start(); //Check again if (session_started()) { echo 'The session has been started.<br />'; } else { echo 'The session has not been started.<br />'; } //Flush the buffer to screen ob_end_flush(); ?> Regards Huggie
-
Horrible way to do things... It's a workaround for crap coding in the first place Regards Huggie
-
The functions I provided you with are designed for stuff like that and you shouldn't need any client side header setting. Regards Huggie
-
I can't see anything wrong with the code you posted. Maybe it's somewhere in the code you haven't posted. Regards Huggie
-
Nope Regards Huggie
-
It can't be set in milliseconds, only seconds. As for a code snippet, have you read the manual? There's a good example there. Regards Huggie
-
You could add it to an array each time, then just take the last 5 elements? Regards Huggie
-
Try ltrim(). Regards Huggie
-
Hmmm, possibly use curl_setopt() with the CURLOPT_TIMEOUT option. Regards Huggie
-
Also take a look at the output buffering functions. Regards Huggie
-
Please try to indent your code. It's will make it easier to read, this is no help to anyone: if($thumb->getSize()){ if($thumb->setThumbnail()){ if($thumb->copyImage()){ if($thumb->resizeImage()){ $thumb->copyResize(); $thumb->display(); } } } } } else { echo("Invalid image/file has been uploaded. Please upload a supported file-type (JPEG/PNG)"); unlink(IMAGE_FULL . $fileName); die(); } Regards Huggie
-
[SOLVED] Upload file directory setting
HuggieBear replied to emediastudios's topic in PHP Coding Help
move_uploaded_file() takes 2 arguments, a source file and a destination file. So use something like this in your for loop: // Full path to image directory $path = '/usr/domain/public/images/'; // Move file to new location move_uploaded_file($_FILES['uploadFile'. $x]['tmp_name'], $path . $file_name) Incidently, there's an easier way to write this. You could use an array from your form, rather than individual field names. If you'd like further info then let me know. Regards Huggie -
how to download a file only from my website?
HuggieBear replied to yoni ^_^'s topic in PHP Coding Help
I don't think that's what the OP's after. I'd imagine they want to check the referrer. Regards Huggie -
Use the $_POST variables as defaults to the input fields. Regards Huggie
-
No it moves it to that location, hence the function name move_uploaded_file() It's not called copy_then_delete_uploaded_file() Yes, if you were going to use ftp_put() then you'd need to remove it from the original location afterwards using unlink(). As for the location of the temporary uploaded file, it's specified in $_FILES['file']['tmp_name'] Regards Huggie
-
[SOLVED] Upload file directory setting
HuggieBear replied to emediastudios's topic in PHP Coding Help
Take a look at move_uploaded_file() Regards Huggie -
You do indeed... Handling File Uploads Regards Huggie