need PHP script help

Web page creation, programs, scripts, PHP, SQL?

Moderator: Moderators

Postby gome » Fri Jul 16, 2004 2:42 pm

hi!

erm, i'm trying to write a php script that processes xhtml upload forms. i'm a total n00b in php, so sorry if it's a stupid question ;)

when using the move_uploaded_file function, the function accepts 2 arguments, rite? about the second argument, "string destination", what should i enter so that the file will be stored into a folder called "uploads" in my public_html folder? should it be something like 'http://www.polarhome.com/~gome/uploads/' ?

thanx in advance :)
gome
 

Postby miker_alpha » Fri Jul 16, 2004 8:58 pm

*not* from my own experience, but found on www.php.net:
Also note that the 'string destination' should be the full path and filename. As long as your server isnt using virtual hosting, you should be able to use $_SERVER['DOCUMENT_ROOT'] . "path/within/website". This'll save hours of hassle trying to get sometimes ignorant ISPs to give you your full and 'no symlinks' path.

HTH

MikeR
Look for OpenVMS help on my webpage
Check for QOTD here.
Image
User avatar
miker_alpha
Moderator
Moderator
 
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby DenisF » Fri Jul 16, 2004 9:17 pm

On a sidenote, polarhome uses safemode, so you won't be able to do any file functions.
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby gome » Sat Jul 17, 2004 2:24 am

oh, safemode disables the file functions? ah, so i see...hmm, almost every free webserver available enables the safemode...how am i going to test my assignment.....sigh. :(
gome
 

Postby DenisF » Sat Jul 17, 2004 2:55 am

You can install apache+php on your pc
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby gome » Sat Jul 17, 2004 5:08 am

i tried doing that and after installing, i had no idea wat happened :D. anyway, does the FreeBSD server here offer the full php, ie disabled the safe mode? is the host name to login freebsd.polarhome.com? i can't seem to login though...

thanx for the replies. :)
gome
 

Postby DenisF » Sat Jul 17, 2004 5:30 am

no .polarhome.com server offers *full php*.

All of them have the same restrictions.
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby gome » Sat Jul 17, 2004 7:57 am

erm, i read the php descriptions for freeBSD and the safe_mode is "off". but how do i upload my web documents using ftp if the server is freeBSD? i'm using wstp_le. what should the host name be?
gome
 

Postby jagar_freebsd » Sat Jul 17, 2004 8:10 am

i tried doing that and after installing, i had no idea wat happened

That's why there is a PHPTraid. . .
Use Sokkit, if its hard to make it on your own.
Sokkit is pretty simple click, click and easy to use.
I can give you unlock(sokkit), if you need.
(but try to make your own compilation, its always GOOD)

PS: at these days, almost every servers are safemode enabled, no matter paid or free. And in some cases, there are restrictions for shell programs. So face the fact :P
Learn the hard way, its good for your health. . . :-)
>>>Laugh<<< is a life energy.
User avatar
jagar_freebsd
Advanced Member
 
Posts: 58
Joined: Mon Nov 24, 2003 4:40 am
Location: Missouri, US

Postby jagar_freebsd » Sat Jul 17, 2004 8:33 am

<!--QuoteBegin-gome+Jul 17 2004, 06:57 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (gome @ Jul 17 2004, 06:57 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> erm, i read the php descriptions for freeBSD and the safe_mode is "off". but how do i upload my web documents using ftp if the server is freeBSD? i'm using wstp_le. what should the host name be? [/quote]
hostname: www.polarhome.com
port: 711
user: gome
pwd: blah
mode: passive
and you are in.
Then go to public_html.
and upload there. . .
PS: t35.com = suck = lycos
You can find this instruction 100x100to the power 100 times.
I don't know why i am answering to the question which is asked more than 10x10 to the power 65 times.
EDIT:
(heh one Q to all: what is the max arithmetic limit name of the integer, hint millions billions, and which country has the max names? )
>>>Laugh<<< is a life energy.
User avatar
jagar_freebsd
Advanced Member
 
Posts: 58
Joined: Mon Nov 24, 2003 4:40 am
Location: Missouri, US

Postby gome » Sat Jul 17, 2004 10:58 am

wow, thanx for the info man. i finally found out that my script works with that sokkit...ahh, a relief. i gotta thank u and (thank u)x10^9 :D
gome
 


Return to Web development

Who is online

Users browsing this forum: No registered users and 5 guests

cron