Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-13-2005, 04:38 PM   #1
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
php help

Trying to put an upload file php script on my site. Am getting an error with this script:

Code:
<?php
if(!isset($_POST['Upload']))
{
	include("form_upload.inc");
} # endif
else
{
	if($_FILES['pix']['tmp_name'] hahahaha "none")
	{
		echo "<b>File did not successfully upload. Check the file size. File must be less than 500kB.<br>";
		include("form_upload.inc");
		exit();
	{
	if(!ereg("image",$_FILES['pix']['type']))
	{
		echo "<b>File is not a picture. Please try another file.</b><br>";
		include("form_upload.inc");
		exit();
	}
	else
	{
		$destination = '/home/asianr/public_html/'."\\".$_FILES['pix']['name'];
		$temp_file = $_FILES['pix']['tmp_name'];
		move_uploaded_file($temp_file,$destination);
		echo "<p><b>The file has successfully uploaded:</b>
			{$_FILES['pix']['name']}
			({$_FILES['pix']['size']})</p>";
			}
		}
	?>
Parse error: parse error, unexpected $ in /home/asianr/public_html/pa/uploadfile.php on line 30

line 30 shows up as
Code:
		$destination = '/home/asianr/public_html/'."\\".$_FILES['pix']['name'];
I think it could be a problem with the /home/asianr/public_html/ part as everything else was copied from a book but I am not sure what to put.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 04:40 PM   #2
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,630
did you set your permissions ( chmod) at the proper level?
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 04:41 PM   #3
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
yes the folders are at 777
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 04:44 PM   #4
kernelpanic
Too lazy to set a custom title
 
Join Date: Jan 2005
Posts: 2,961
fucked up quotes on or around 30
kernelpanic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 04:45 PM   #5
ddfGandalf
Confirmed User
 
Join Date: Feb 2005
Location: Budapest, Hungary
Posts: 534
icqed you
__________________
ddfGandalf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 04:45 PM   #6
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
copied it from a book, would you be able to paste the correct? I would really appreciate it
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 05:04 PM   #7
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
Code:
if($_FILES['pix']['tmp_name'] hahahaha "none")
	{
		echo "<b>File did not successfully upload. Check the file size. File must be less than 500kB.<br>";
		include("form_upload.inc");
		exit();
	{
The last character I included, { is wrong, should be }
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-13-2005, 05:05 PM   #8
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
WHEN EVER you get this error, it always means that you did not include enough closing brackets for an if or looping statement of some kind. So check your }'s or lack thereof.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.