473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

problem with copy

Hi all,
I don't understand why this script want work

if($_POST['students'] == true)
copy("$file" , "/students/$file_name")
else echo "no check";

Parse error: parse error, unexpected T_ELSE

really thanx :)

Jun 15 '06 #1
2 1168
You forgot the semicolon:

Davide wrote:
if($_POST['students'] == true)
copy("$file" , "/students/$file_name") <-- put a semicolon here
else echo "no check";

Parse error: parse error, unexpected T_ELSE


Jun 15 '06 #2
Davide schrieb:
Hi all,
I don't understand why this script want work

if($_POST['students'] == true)
copy("$file" , "/students/$file_name")
else echo "no check";

Parse error: parse error, unexpected T_ELSE

really thanx :)


I would change two things - at first i would use braces. And the second
thing (it's the error) - use the semikolon at the end of a line!

if([..]){
[do s.th.];
} else {
[do s.th.];
}

good luck
Johannes

--
Emails ohne "[nospam]" im Betreff werden kommentarlos gelöscht.

Jun 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tjerk Wolterink | last post by:
Hello i've an xpath problem using sablatron in php. In xsl i have the following code: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
7
by: Christian Engström | last post by:
When i compile the program listed below with gcc version 3.3.1 (MinGW on Windows XP) I get the following result: Calling 'func(d)': 'base' copy constructor Calling 'func(*d_handle)': 'base'...
15
by: Ken Allen | last post by:
I have been developing a suite of assemblies over the past couple of weeks, and this afternoon somethign started misbehaving. If I do not run the IDE and compiler the code from the command line,...
2
by: Pete Davis | last post by:
I'm getting an exception when trying to copy a file. I basically do a File.Copy(source, dest, false); source is the source full path and filename. dest is the destination full path and...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
9
by: burningsunorama | last post by:
Hi guys! This is maybe a too 'academic problem', but I would like to hear your opinions, something like pros and cons for each approach.... ... Recently we've had at work a little talk about the...
11
by: Brian | last post by:
Dear Programmers, I have a class with a pointer to an array. In the destructor, I just freed this pointer. A problem happens if I define a reference to a vector of this kind of class. The...
2
by: toton | last post by:
Hi, I am trying to use boost::range with one of my own container class, and having some problem. I am missing some usage of range. Can anyone suggest a proper way for it ? To show the problem...
13
by: Jeroen | last post by:
Hi all, I'm trying to implement a certain class but I have problems regarding the copy ctor. I'll try to explain this as good as possible and show what I tried thusfar. Because it's not about a...
9
by: Mantu | last post by:
I found nice realtime fluid simulation code created with c++. I converted it to vb.net but i have run into trouble. You can find original c++ code here:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.