Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About OtagoHarbour

  • Rank
  • Birthday 07/01/1955

Contact Methods

  • Website URL
  • ICQ
  1. I have figured out that it is not the length of the file names but the size of the files. The PHP post failed because the files were 11 MB each. Two of them exceeded the php.ini limit of 20 MB.
  2. I was not sure whether this question belongs here of in the PHP forum since my problem may be with one or the other or both. I use the following html and php code to select and upload multiple files.HTML <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple="multiple"/></br> <input type="submit" name="submit[]" value="submit" /> </form> uploadFiles.php <?php if(isset($_POST['submit'])) {
  3. I tried that code except without <!doctype html> since it is a PHP file. I found that if(isset($_POST['submit'])) returns false. I don't know why this is since this is my form code and I selected 2 files. <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple /><br> <input type="submit" name="submit" value="submit" /></form> Thanks, OH
  4. Thank you for your reply but it still does not appear to be working properly. I tried echo "_FILES[file]: " . print_r($_FILES['file']) . "<br>"; if ($_FILES["file"]["error"][0] > 0) { echo "Error: " . $_FILES["file"]["error"][0] . "<br>"; // this would check for error only for that first image selced } else { echo "No. files uploaded : ".count($_FILES['file']['name'])."<br>"; echo "Upload: " . $_FILES["file"]["name"][0] . "<br>"; // this selects the name of the first image selected echo "Type: " . $_FILE
  5. I am trying to modify the code given here to upload multiple files. The code I use is as follows. ?> <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple><br> <input type="submit" name="submit" value="Submit"> </form><? uploadFiles.php has the following code <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"][0] . "<br>"; } else { echo "
  6. Yes. That was the problem. Thanks again.
  7. Sorry. I should have mentioned that I am doing everything in JavaScript with some HTML. However you are certainly right about the caching causing the problem. I put the following code <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /><meta http-equiv="Pragma" content="no-cache" /> in the head section of index.html and that appears to have solved the problem. Thank you very much for you help,Peter.
  8. I used loadXMLDoc to load an XML file onto my web page. I then saved different contents to a file of the save name. When I reloaded the file with loadXMLDoc, I got the original contents instead of the new contents. I deleted the file and then save the new contents to the file with the same name. Reloading still gave me the old contents. I then changed the name of the file. This time loading the file with loadXMLDoc gave me the new contents. Does loadXMLDoc remember the contents that was loaded from a file with a given name and not bother reloading the contents if I present it with a file of th
  9. I would like to use PHP to put a vertical space on a web page. echo "<br \><br \><br \><br \>"; works fine on FireFox but probably breaks several rules in relation to strict xhtml and may not work as well on other browsers. Is there are more standard/correct/robust way of doing this? Thanks,Peter.
  10. Thanks. I'll try that and see if it works. The problem with what I had initially was that I did not specify the contect so it took the default. Thanks,Peter.
  11. Someone gave me the answer. It should be <li><a href="">About</a></li>
  12. I tried chaning the php code to <li><a href="$_SERVER['']/">About</a></li> but now it tries to accesshttp://localhost//$_SERVER['']/ I want it to just try to access192.168.1.4/about.php without all the preceeding stuff. Thanks,Peter.
  13. I am hosting a web site from home. My system has two layers: a web server (running Ubuntu 11.04) that is port forwarded through port 80 and has only index.php on var/www and an application server (running Ubuntu 11.10) that has everything else and is set up to only talk to the web layer server. index.php has the following line of code. <li><a href="">About</a></li> This is a menu item that is supposed to call about.php which is located in var/www on the application server which has the local IP address However, when I click the bu
  14. No worries. I sorted this out. I just needed to uninstall the old Apache.
  15. Thank you so much for your help. I fixed the validator problems and also added two tables, gradually adding what I needed to them and now the web page looks exactly as I would like it to look. Thanks again. The issue that I need to deal with now is that my web server is running Apache http://httpd.apache.....3/windows.html but it seems that I would need WAMP (for Windows) in order to use PHP. I have used WampServer http://www.wampserver.com/en/ in the past. My question is how do I get my web server to use WampServer instead of regular Apache? It is currently looking for my index.html file
  • Create New...