The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > Web Programming > PHP


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags: , , ,

Closed Thread
 
LinkBack (6) Thread Tools    Display Modes   
  6 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 06-14-2007, 08:10 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,109
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Icon9 [SOLVED] How do you test your PHP?

Do most of you have web hosting already and test it on your web host? Or do you test it on the local machine? I personally prefer if I'm able to test it on my local machine, so that I don't have to upload before I see the result

yesterday, I installed XAMPP, and for some reason I still couldn't test my .php file, can anybody help me with this? I tried already to go to localhost, and indeed it works. I put my test.php inside the folder that I named test/ inside xampp folder. So the structure would look like this:

Code:
C:/xampp/phptest/test.php
I tried to go to

Code:
localhost/phptest/test.php

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #2 (permalink)  
Old 06-14-2007, 09:02 AM
chrishirst chrishirst is offline
Jr. Programmer
Join Date: Jun 2007
Location: Blackpool UK
Posts: 87
iTrader: (0)
chrishirst will become famous soon enoughchrishirst will become famous soon enough
is the webserver root pointing to the c:\xampp folder ?

__________________
Chris
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #3 (permalink)  
Old 06-14-2007, 09:05 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,109
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
that's on my local machine
XAMPP home page on my local machine will come up if I would just have type localhost in the internet explorer...

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #4 (permalink)  
Old 06-14-2007, 09:17 AM
Lee's Avatar
Lee Lee is offline
PT Staff*
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: Blackpool, UK
Posts: 615
iTrader: (0)
Lee will become famous soon enoughLee will become famous soon enoughLee will become famous soon enoughLee will become famous soon enough
i have not used XAMPP though i have set up apache with php on it and mine worked fine once i had set the route and also the route of the php, at the moment i just upload my script to another host using FTP, all i have to do is click one button as i have set it up and it works well.

If you can type localhost and it comes up with the home page then create your test php folder in there and in your address bar type, localhost/testphp/test.php

it should work if you have set up php correctly.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #5 (permalink)  
Old 06-14-2007, 09:21 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,109
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
hmmm... interesting, then probably I should try again
hey, I just looked over PHP documentation, what is var_dump(); for? why does it have to be arround isset($var); ?

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #6 (permalink)  
Old 06-14-2007, 09:31 AM
chrishirst chrishirst is offline
Jr. Programmer
Join Date: Jun 2007
Location: Blackpool UK
Posts: 87
iTrader: (0)
chrishirst will become famous soon enoughchrishirst will become famous soon enough
var_dump is a debugging tool to output information about the variable that it references.

See PHP: var_dump - Manual

__________________
Chris
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #7 (permalink)  
Old 06-14-2007, 09:37 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,109
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
got it, thanx
It's similar to if I debut each line of my code by printing right? but if that's the case, why don't they just use echo? can't echo also dump the output of a variable?

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #8 (permalink)  
Old 06-14-2007, 10:11 AM
chrishirst chrishirst is offline
Jr. Programmer
Join Date: Jun 2007
Location: Blackpool UK
Posts: 87
iTrader: (0)
chrishirst will become famous soon enoughchrishirst will become famous soon enough
echo will only output the current value of a variable

var_dump will output the type and value and in the case of an array will output all of the elements with their types and values.

extremely useful if you are debugging associative arrays from database data

__________________
Chris
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #9 (permalink)  
Old 06-14-2007, 12:51 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,109
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Quote:
Originally Posted by chrishirst View Post
echo will only output the current value of a variable

var_dump will output the type and value and in the case of an array will output all of the elements with their types and values.

extremely useful if you are debugging associative arrays from database data
DUGG!! ~ Thanx for nice simple and straight forward description


__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
  #10 (permalink)  
Old 06-14-2007, 04:47 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,109
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
still doesn't work at this, please help
I don't know why, this is the error message:

Quote:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
06/14/07 1659
Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.2
I used localhost/grady/test.php as my URL

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by HelloWorld : 06-14-2007 at 04:53 PM.
Closed Thread


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.programmerstalk.net/thread719.html
Posted By For Type Date
Digg - PHP difference between var_dumb and echo This thread Refback 06-15-2007 08:12 AM
Digg / Programming / Upcoming This thread Refback 06-15-2007 03:44 AM
Digg / Programming / Upcoming This thread Refback 06-14-2007 04:14 PM
Digg / Technology / Upcoming This thread Refback 06-14-2007 02:24 PM
Digg / Programming / Upcoming This thread Refback 06-14-2007 01:11 PM
Digg / News / Upcoming This thread Refback 06-14-2007 01:04 PM


All times are GMT -7. The time now is 11:23 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50