This is a good book for learning PHP
14 posts
• Page 2 of 2 • 1, 2
OK... I have been looking and reading and I can not see it anywhere. Can you help me to find where to set the globals?
"Life is merely a fraction of a second. An infinitely small amount of time to fulfill our desires, our dreams, our passions." Paul Gauguin (1848 - 1904)
AEST
AEST
- Dalsim
- PROfessional Member
- Posts: 1119
- Joined: Sun Jun 15, 2003 7:07 am
- Location: Queensland, Australia
dalsim wrote:OK... I have been looking and reading and I can not see it anywhere. Can you help me to find where to set the globals?
They are near the top of "upload.php" with a section called "GLOBALS." If you are not using a syntax highlighting browser, reading through code can be difficult at times.
Here are the first few lines of the section you are looking for:
- Code: Select all
/*******************************GLOBALS**********************************/
// /*
// DESCRIPTION OF $NAME_OF_VAR
// */
// $NAME_OF_VAR = "foo";
/*
Full path to directory where uploads will be kept, include trailing slash.
It would probably be a good idea to keep this out of the web document tree.
Note: This directory needs to be writable to by the webserver.
*/
$UPLOAD_DIR = "/home/jurbanek/upload/";
/*
If $USE_ORIG_FILENAME = true, the original filename will try to be used. If the filename
does not pass certain security requirements, the temporary filename assigned by
PHP (like "php5gt7e9") will be used to store the file. If set to false, will
not even try to use the original filename even if it would pass inspection.
Set this to false if you want maximum security, and do not need the original
filename to be preserved. It is set to true by default.
*/
$USE_ORIG_FILENAME = true;
There are many more below it, make sure to read through them and read all the documentation. If you haven't ever programmed in PHP, this will be a great learning experience for you.
-Weaver
Public Keys
The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
- Weaver
- PROfessional Member
- Posts: 1967
- Joined: Wed Jun 19, 2002 12:05 am
- Location: /home/weaver/
Ok I know the section that you are talking about but what in it do I change? I have read the documentation and I can not see where to change it so that it will upload to the directory....
I must be blind.
I must be blind.
"Life is merely a fraction of a second. An infinitely small amount of time to fulfill our desires, our dreams, our passions." Paul Gauguin (1848 - 1904)
AEST
AEST
- Dalsim
- PROfessional Member
- Posts: 1119
- Joined: Sun Jun 15, 2003 7:07 am
- Location: Queensland, Australia
OK never mind. I was blind. I got it working now.
Thanks Weaver
Thanks Weaver
"Life is merely a fraction of a second. An infinitely small amount of time to fulfill our desires, our dreams, our passions." Paul Gauguin (1848 - 1904)
AEST
AEST
- Dalsim
- PROfessional Member
- Posts: 1119
- Joined: Sun Jun 15, 2003 7:07 am
- Location: Queensland, Australia
14 posts
• Page 2 of 2 • 1, 2
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 2 guests