Results 1 to 8 of 8

Thread: Add files to server

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216

    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
    Quote Originally Posted by randem
    You think you are confused? Try reading what you wrote...

  2. #2
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: Add files to server

    wat server are u using? of its local host type in 127.0.0.1 in the browser

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: Add files to server

    oops

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216

    Re: Add files to server

    Quote Originally Posted by visualAd
    http://127.0.0.1/phpinfo.php

    127.0.0.1 isthe local IP address of your computer. You can also use localhost instead.
    Okay but how do I add something of my own, like http://127.0.0.1/test.php ?
    Quote Originally Posted by randem
    You think you are confused? Try reading what you wrote...

  6. #6
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    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

  7. #7
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    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.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216

    Re: Add files to server

    Thank you so much AIS4U

    That helped me a lot
    Quote 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
  •  



Click Here to Expand Forum to Full Width