Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Client Side PHP

  1. #1
    Regular Coder
    Join Date
    Jun 2005
    Posts
    153
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Client Side PHP

    Hello Everyone,

    Is there any way to run PHP files easily client-side. I've looked at Google gears that easily gives a local server. I also know that I could install WAMP, or LAMP. However, is there any PHP Runtime Environment like Java's ability to have .jar files and also be web applets. I know Java does work a little differently than this specifically but still is there a way to get PHP to run client-side easiely?

    -questionable

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You'll always need a PHP interpreter to run it, but you can package you're php into phar files if you wanted to. Phar requires PHP5.2+ and had bugs until 5.2.6. This lets you create a 'package' similar to how java handles their packages. I haven't had a chance to play around with this in a PHP5.3 environment with namespacing at this point in time, so I'm uncertain how this will interact with the spl_autoload handling.
    Aside from the phar, you only need a php executable to run via cli or cgi. This is included in all php distributions. Best I know you cannot package this into a phar since that itself is just a compressed collection of php files. Best way to think of phar is like a jar file.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    download Wamp server http://www.wampserver.com/en/download.php .........and install it on your root of your hard drive so it should have the directory 'localdrive':\wamp\
    to run php code place your .php files in 'localdrive':\wamp\www\ then in your browser type http://localhost/filename.php and it should work.
    to access phpmyadmin type http://localhost/phpmyadmin/
    be sure to exit skype because some of the function won't work with wampserver becase skype uses the same port number as it

  • #4
    Regular Coder
    Join Date
    Jun 2005
    Posts
    153
    Thanks
    26
    Thanked 0 Times in 0 Posts
    Is there any better wrapping system then installing WAMP?

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You can just download the php source or package from the php.net website. In it is the executable for it that can be run on the command line. HTML will be of no use to you of course.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #6
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •