Re: question about some php code

  • From: Alex Parks <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sun, 21 Oct 2007 14:26:11 -0400

The ip address code has been moved to html; it is no longer in js. I replaced mine with the exact code in your email, but it refuses to print the ip address. Here is the exact error I get when, after selecting a file, I click the "upload file" button: Parse error: parse error in /var/www/html/mehgcap/uploader.php on line 2 As you probably guessed, the path is where the php file is stored on the server; it is correct. I have created a dir called "upload" on the server, by the way, and have tried several alterations to the path; instead of just "upload", I looked at my ftp program which says I am in a longer path than just /upload, so I tried that path and that path plus upload. I hope that made some sense.


Have a great day,
Alex

----- Original Message -----
From: Ilian Andreev <ilian_andreev@xxxxxx
To: programmingblind@xxxxxxxxxxxxx
Date sent: Sun, 21 Oct 2007 21:05:28 +0300 (EEST)
Subject: Re: question about some php code

Well Alex,

When you download the page, it`s stored on your PC, and the
Javascript that manipulates this page is executed within YOUR browser, not on the server. That is why the PHP code doesn`t work. You can`t print PHP via Javascript and receive results..

Second, I don`t know why you get errors. The script works just
fine. Make sure the input field name is the same as the variable index $_FILES['uploadedfile']['name'] , uploadedfile. This is one suggestion.
If you can paste me the error message I could help you.

And last you are not cursed, there are always hurdles to overcome
when it comes to programming ;)
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: