|
-
Oct 7th, 2005, 08:17 PM
#1
Thread Starter
Addicted Member
Add files to server
I was hoping someone could clear up a few things for me.
I just installed PHP (with the help of PHP Tutorial
What I don't understand is what to do now? I don't know how to add say, a test php file to the server. I followed the directions in the tutorial to put it in the htdocs folder just like it told us to do with phpinfo.php
I know this is a newbish question, but I'm anxious to get started with php!
James
 Originally Posted by randem
You think you are confused? Try reading what you wrote...
-
Oct 7th, 2005, 11:03 PM
#2
Hyperactive Member
Re: Add files to server
wat server are u using? of its local host type in 127.0.0.1 in the browser
-
Oct 8th, 2005, 12:29 AM
#3
Re: Add files to server
http://127.0.0.1/phpinfo.php 
127.0.0.1 isthe local IP address of your computer. You can also use localhost instead.
-
Oct 8th, 2005, 10:28 AM
#4
Hyperactive Member
-
Oct 8th, 2005, 02:46 PM
#5
Thread Starter
Addicted Member
Re: Add files to server
 Originally Posted by visualAd
Okay but how do I add something of my own, like http://127.0.0.1/test.php ?
 Originally Posted by randem
You think you are confused? Try reading what you wrote...
-
Oct 9th, 2005, 01:03 AM
#6
Hyperactive Member
Re: Add files to server
make the file put it in the same directory as ur php thinger (thats wat i have to do) and type 127.0.0.1/folder/filename
-
Oct 9th, 2005, 02:10 AM
#7
Frenzied Member
Re: Add files to server
james14:
PHP is known as an HTML embedded scripting language. So basically you are just writing HTML pages, but instead of using Visual Basic Script or Java Script or whatever, you are going to be using PHP. You probably already knew that.
The PHP is going to manipulate the information you want to appear in your page and HTML is going to display that information in your Web browser. You probably already knew that also.
Here is a simple PHP page which you can cut and paste into Notepad or whatever you are using to write your PHP scripts. Save the file in htdocs as Test.php and then you can test it using your browser.
<!DOCTYPE HTML public "_//W3C/DTD XHTML 1.0 Transitional//EN"
"HTTP://WWW.W3.ORG/tr/2000/REC-xhtml1-20000126/DTD/xhtml1=transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content=type" content="text/html; charset=iso-8859-1" />
<title>PHP Start</title>
</head>
<body>
<?php
echo "This is the first PHP page created by James14.";
echo "<BR/>James14 is going to save this file as Test.PHP.";
print "<BR/>Now James14 is going to really get into PHP and write code, write code.";
?>
</body>
</html>
If you go to your browser and enter:
http//localhost/test.php
or
http//127.0.0.1/test.php
You should see the text between the PHP tags displayed.
The <?php and ?> are the beginning and ending php script tags and you put your php script inside these tage.
You will notice that the code has two (echo) statements and one (print) statement. These are php functions. You will also notice that each line of php code ends with a semi-colon ( ; ).
The second echo statement and the print staement each start with "<BR/> which is just a plain old HTML tag to insert a line break.
I hope this helps point you in the right direction and then you can get on with becoming a PHP expert in no time at all.
Good Luck
Last edited by AIS4U; Oct 9th, 2005 at 02:18 AM.
-
Oct 9th, 2005, 10:20 AM
#8
Thread Starter
Addicted Member
Re: Add files to server
Thank you so much AIS4U
That helped me a lot
 Originally Posted by randem
You think you are confused? Try reading what you wrote...
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
|