|
-
Aug 24th, 2001, 11:06 PM
#1
Thread Starter
Frenzied Member
Help
how do you use PHP and Perl? how do you program them? You dont have a program like VB or C++....
-
Aug 24th, 2001, 11:13 PM
#2
the reason I asked you to do it down here is because they (mods) are asking to post it in the right forum.
now that thatis out of the way, what do you want to make? there a re a lot of sites that give you a tutorials on the subject.
using it is quite easy. this is php
PHP Code:
<?php
echo "<P>Hello World! I'm using PHP!</p>\n";
?>
and perl is not like that at all. you start out with a shebang line #!/usr/bin/perl
and then it goes into the language.
here is a php tutorial to start off with.
http://www.thickbook.com/srccode/ind...ml?b=pe&ch=pe1
most of the time I use notepad to program them. but you can use whatever text editor you want.
-
Aug 24th, 2001, 11:19 PM
#3
Thread Starter
Frenzied Member
well..when you put /usr/bin/perl is that only for Unix or Linux machines? would i put something like, #!/download/perl or what? (I have the Camel book that Mr. Wall sent me he even signed it too...he's awesome. Most of it i understand the programming language and everything) well, my other question is..where do i put the code? in Notepad or something? I am running Windows Me. I also have ActiveState ActivePerl i think thats what it is.
-
Aug 24th, 2001, 11:24 PM
#4
if you have active perl you still won't be able to run it unless you have a server installed, the best one I think is Apache. the shebang line is the place where you have perl installed. that is usually /usr/bin/perl on *unix machines. but if you used activeperl then it will be like #!c:/perl/bin/perl
you can put it in any text editor, like notepad and when you save it save it as a .cgi or .pl. then you can run it with teh server and your browser.
-
Aug 24th, 2001, 11:27 PM
#5
Thread Starter
Frenzied Member
why do i need a server? why cant i just run it from Internet Explorer like when i make a web page out of HTML i can just save it to *.html and then i can just run it from Internet Explorer or Netscape (I use IE).
-
Aug 25th, 2001, 12:04 AM
#6
because it doesn't work that way. IE doesn't have the power to do that. tha tcomes from the server. it needs a parser to make the outcome of the perl program and the perl.exe won't run very well by itself. sure you can but it will put up a dos box so fast you won't even see it. that is why you need a server to run the code.
-
Aug 25th, 2001, 10:34 AM
#7
Thread Starter
Frenzied Member
How would i program PHP? In notepad? what do i save it as? it's not letting me save it has filename.php..it's saving as filename.php.txt.
-
Aug 25th, 2001, 10:36 AM
#8
Thread Starter
Frenzied Member
oh yeah...how does the code know where i installed PHP?
-
Aug 25th, 2001, 11:16 AM
#9
in notepad, you have to goto file types and save as *all, that way you can save as .php. how does what code know where you installed php? Like I said, you have to have a server to run that as well.
on some systems you have to have the shebang line as well for php. if it is in there and the server doesn't need it it won't hurt anything, it will just show up in the page and then you can take it out if you see that. once the server sees the php extension it automatically knows where the php parser is.
-
Aug 25th, 2001, 11:17 AM
#10
Thread Starter
Frenzied Member
ok..what kind of web server can i get for WinMe?
-
Aug 25th, 2001, 11:25 AM
#11
Apache should work for it, you would hav eto read the apache.org page and find out if it does.
download here
http://httpd.apache.org/dist/httpd/binaries/win32/
and take the one that says apache_1.3.20-win32-no_src-r2.msi
then when you install it and get it running go here to read how to set it up
http://www.lameindustries.org/tutori...s/apache.shtml
-
Aug 25th, 2001, 11:27 AM
#12
Thread Starter
Frenzied Member
what exactly does a web server do? i've never really got into web servers and stuff...does it let you have like your own domain or something? what exactly does it do?
-
Aug 25th, 2001, 12:05 PM
#13
PowerPoster
it processes your code, allows people to connect to you and recieve/send info. etc.etc.etc
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 12:15 PM
#14
besides what Sail says you can also have just a server on your machine to test you code. That way you don't have people connecting to your computer. I wouldn't recommend winMe for a web server. if you want that then go with Win2000 or Linux. but just set it up so you can test scripts then it is not so bad. I have mine on win98se and Apache with php, perl, and Mysql. I use this to test my scripts and then up load them to my ISP for my site.
-
Aug 25th, 2001, 12:38 PM
#15
Thread Starter
Frenzied Member
well, how would i use scripts and such on a freeyellow site or something free like that? I use AOL so...heh..plus i'm 56k...i can't get cable or dsl out here. it sucks.
-
Aug 25th, 2001, 01:07 PM
#16
well free sites don't usually let you do it, but there are a few that you can use php and mysql.
www.F2s.com I think will let you use php. there is a couple more but I don't know what they are and F2s is real slow.
you will have to check and see what sites let you use scripts as they won't let you since it is a security hazard for them. if you were with a regular ISP and not AOL, then you could use the scripts, well most do anyway.
-
Aug 25th, 2001, 02:22 PM
#17
PowerPoster
Unix hosting these days is very cheep anyway. You could probably get a very nice webhost for around $10 a month that would support everything you want.
check out http://www.burlee.com HIGHLY RECOMMENDED
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 05:44 PM
#18
Thread Starter
Frenzied Member
well, i can't buy a webhost cause i'm 15 and i dont pay the bills and my parents wouldn't let me get a webhost..anyway....how would i execute the scripts in like my webpage? this stuff is completely new to me. if you have any web sites for beginners with scripts and stuff...can you please post them? thanks!
-
Aug 25th, 2001, 06:15 PM
#19
PowerPoster
http://www.cgi101.com/class/
and, i think that http://www.php.com has some good stuff. Also, if you learn good by example, look at this site: http://www.hotscripts.com
good luck, and have fun
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 06:25 PM
#20
Yes like Sail aid those sites are good if you want to learn. I have found out that programming is not really that hard and you don't have to know it all as you can just copy and paste until your heart is content from other scripts but you have to know how things flow and what some of it actually is doing. I have learned a lot just looking at other scripts and see how they go. I started out by taking already done scripts and changing them to suit my needs, then you can get the feel on how they work and start doing your own.
But I am still in the process of learning it as I am doing it myself and not taking any classes. my motto :: do by example ::
hope you have fun as you have a cool road a head of you, and if you run into problems just pop in here and we'll help you out.
this part of the forum has changed since I came in here, you don't have to wait as long to get you questions answered  but if we don't know then you will, but hang tough, someone is bound to find the answer.
-
Aug 25th, 2001, 07:13 PM
#21
PowerPoster
note: i posted the wrong link above: it should be http://www.phptown.com, not http://www.php.com
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 07:16 PM
#22
Thread Starter
Frenzied Member
well...it looks like freeyellow supports it...see? this was in the terms of service.....
17.1 Except as provided below, FreeYellow makes CGI processes available as part of all Hosting Services. FreeYellow maintains the right to disable any CGI script and, if necessary, the Member's account without prior notice if FreeYellow determines the script presents a security risk or a server overload. FreeYellow also prohibits the use of any scripts that automatically update a links listing. Any CGI scripts that are determined to be inherently malicious may result in termination of the Member's account and the pursuit of any and all legal remedies available to FreeYellow.
so how would i execute scripts? the embed src thing in HTML?
-
Aug 25th, 2001, 07:19 PM
#23
PowerPoster
seriously, just read the tutorial at http://www.cgi101.com that will tell you all you want to know!
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 25th, 2001, 09:01 PM
#24
-
Aug 25th, 2001, 09:20 PM
#25
-
Aug 25th, 2001, 09:28 PM
#26
scoutt you dumb ****, remove the comma from the end of the address
-
Aug 25th, 2001, 09:35 PM
#27
well I'll be. boy I made a fool of myself. dohhhh I'm such a fart knocker....... he he he he he
yeah that worked.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|