1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

need a tip

Discussion in 'PHP' started by belkocrnic, Nov 29, 2008.

  1. #1
    Hi guys, can someone tell me can I and how can I run php script on a local machine.
    Thanks
     
    belkocrnic, Nov 29, 2008 IP
  2. wwstewart

    wwstewart Well-Known Member

    Messages:
    713
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    140
    #2
    You can install a webserver (like apache) locally and also run PHP through it.
     
    wwstewart, Nov 29, 2008 IP
  3. misbah

    misbah Active Member

    Messages:
    265
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    68
    #3
    try xampp
    www.apachefriends.org/en/xampp.html
    Code (markup):
    or abyss
    www.aprelium.com/
    Code (markup):
     
    misbah, Nov 29, 2008 IP
  4. ms2134

    ms2134 Well-Known Member

    Messages:
    1,188
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    165
    #4
    Yeah, Xampp or WAMP. (Google Them);

    I use XAMPP, and it works well, it comes with the use of PHP, MySQL and more...

    ~ Mike
     
    ms2134, Nov 29, 2008 IP
  5. pondlife

    pondlife Peon

    Messages:
    898
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Do you mean how do you run PHP on the command line?

    As recommended above; install XAMPP (it's got PHP, Perl, Apache, PEAR etc) and then take a look at the command line examples here:

    http://uk3.php.net/features.commandline
     
    pondlife, Nov 30, 2008 IP
  6. iDemonix

    iDemonix Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you're using a UNIX system install PHP and use it from the command line. Mac comes with it built in, all you have to is type 'php whatever.php' and it'll run. I've built IRC bots using PHP and the command line, it's weird using PHP for non-web stuff =P
     
    iDemonix, Nov 30, 2008 IP
  7. khu84

    khu84 Active Member

    Messages:
    441
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Just download install a wampsever setup from wampserver.com and your are ready to go. :)
     
    khu84, Nov 30, 2008 IP
  8. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #8
    If you have the CLI installed.

    php -f "script.php"
    Code (markup):
    php -r "echo \"something\n\";"
    Code (markup):
     
    joebert, Nov 30, 2008 IP