pls am new and i need help in running php cod like to dislay hello world where do i put the code is it at my web server or where and after that how do i run it. Thanks
18 replies to this topic
#1
Posted 02 June 2011 - 07:47 AM
|
|
|
#2
Posted 02 June 2011 - 08:15 AM
You'll need to download and install the PHP interpreter.
PHP: Downloads
If you don't have a web server running on your home computer yet, you'll need that too. I suggest Apache.
Apache Download Mirrors
It's worth noting there are some packages out there that bundle a web server and the PHP interpreter together, which might be easier to install and configure. I just don't happen to know of any by name because being a network admin, I always just install the individual components manually. Perhaps if someone else can suggest one.
PHP: Downloads
If you don't have a web server running on your home computer yet, you'll need that too. I suggest Apache.
Apache Download Mirrors
It's worth noting there are some packages out there that bundle a web server and the PHP interpreter together, which might be easier to install and configure. I just don't happen to know of any by name because being a network admin, I always just install the individual components manually. Perhaps if someone else can suggest one.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid
#3
Posted 02 June 2011 - 09:17 AM
You can download XAMPP (check this section's sticky FAQ, there are links there) and you can run your own self contained server on your home computer.
A quick example of the simplicity, is C:\xampp\www\index.php can be ran in the browser as http://localhost/index.php and interpreted correctly.
A quick example of the simplicity, is C:\xampp\www\index.php can be ran in the browser as http://localhost/index.php and interpreted correctly.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 02 June 2011 - 12:26 PM
thanks every one is really helping but i like the vertrigo becos is small in size but if after installation can i work with it directly or are there other set up and configuration
#6
Posted 02 June 2011 - 02:08 PM
It should allow you to start up the main program and work with it, XAMPP is very easy like this as well so I would assume that Vertigo is too.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#7
Posted 03 June 2011 - 12:12 PM
Hello iscofield (in reply to your private message)
When the program installs, it should place a folder of which you can store your PHP files, the software website does not give any details I suspect however it may be in C:\vertrigo\www or C:\vertrigo\htdocs and similar.
Feel free to look in the installation folder until you find where to put your PHP scripts if there is an example one, or there is a help menu in the program!
Once you install index.php (or whichever you name your PHP file) in to the folder, you can access it through this host: http://localhost/yourfile.php and it will act as a real PHP script parsing it.
Feel free to try it out and report back if you have any success, I can install the software if you wish to find out what to do!
Alexander.
When the program installs, it should place a folder of which you can store your PHP files, the software website does not give any details I suspect however it may be in C:\vertrigo\www or C:\vertrigo\htdocs and similar.
Feel free to look in the installation folder until you find where to put your PHP scripts if there is an example one, or there is a help menu in the program!
Once you install index.php (or whichever you name your PHP file) in to the folder, you can access it through this host: http://localhost/yourfile.php and it will act as a real PHP script parsing it.
Feel free to try it out and report back if you have any success, I can install the software if you wish to find out what to do!
Alexander.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#8
Posted 03 June 2011 - 01:17 PM
...
I'm having thoughts about setting up a XAMPP installation with a detailed tutorial, just finished explaining this last night...
I'm having thoughts about setting up a XAMPP installation with a detailed tutorial, just finished explaining this last night...
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
#9
Posted 03 June 2011 - 06:09 PM
actually the root folder is www and in it there is index.php along other files i think that index.php is an example, but what i did is that in my browser i put http://localhost/www/index.php i even try creating a folder in www to copy the index.php but yet did not work maybe i will try http://localhost/index.php as explain by alex... I will report back soon. Thanks everybody.
Or could it be becos i install it in c:/program/vertrigo instead of c:/vertrigo....
Or could it be becos i install it in c:/program/vertrigo instead of c:/vertrigo....
#10
Posted 04 June 2011 - 01:21 AM
Hello iscofield,
You want to place the documents in the www folder, not create one, you are doing this I assume, "www/www/index.php" of which is not intended rather than www/index.php
You can however access http://localhost/www/index.php to access that (however it is not as simple)
Also a note, when you post links it may become moderated ,please be patient and not post as many duplicates as you do, they will be approved when a moderator sees it.
You want to place the documents in the www folder, not create one, you are doing this I assume, "www/www/index.php" of which is not intended rather than www/index.php
You can however access http://localhost/www/index.php to access that (however it is not as simple)
Also a note, when you post links it may become moderated ,please be patient and not post as many duplicates as you do, they will be approved when a moderator sees it.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#11
Posted 04 June 2011 - 01:33 AM
i did it as u wrote http://localhost/www/index.php still no response wwhy don't u just install to test it making it easy pls
#12
Posted 04 June 2011 - 01:45 AM
Of course I will, when I start up the program I click "Hide this window and start server" if you already hadn't, you can right click the icon on the taskbar and go to the "WWW folder"
For me it is located here:
Maybe have the index.php contain this:
As long as the server is running (and the icon has a green + symbol on the taskbar icon) then you should be able to access localhost, or 127.0.0.1 whichever you prefer and have the scripts appear as they are.
I would be glad to explain further if you have any trouble setting this up,
Alexander.
For me it is located here:
C:\Program Files\VertrigoServ\wwwIt has a few sample folders, feel free to delete everything inside the www folder (i.e. inc, gfx, template, index.php, favicon unless you want them) and place your own index.php in there.
Maybe have the index.php contain this:
<?php phpinfo(); ?>This function will display various information about PHP, and if you see a lot of output then PHP will be working!
As long as the server is running (and the icon has a green + symbol on the taskbar icon) then you should be able to access localhost, or 127.0.0.1 whichever you prefer and have the scripts appear as they are.
I would be glad to explain further if you have any trouble setting this up,
Alexander.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









