Solved

Do I need a PHP project for this?

Posted on 2013-06-28
4
289 Views
Last Modified: 2013-06-29
Well, this might be a pretty naive question.
I am new to PHP and am trying to run and walk-through the scraper code at the location http://pastebin.com/MTj4YtjU 

I have the latest NetBeans and WAMP installation on my windows machine. For me to do a step-by-step debug of this code, please let me know if it is okay to follow the following steps:

1) Create new PHP application project
2) Create a PHP file within the source folder and paste the source code.
3) Add breakpoint and Run debug.

Please let me know if my understandings are right.
0
Comment
Question by:sukhoi35
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:sukhoi35
ID: 39283668
I read I also need a xdebug application to successfully debug php code. Am currently downloading it.
0
 
LVL 12

Accepted Solution

by:
adrian_brooks earned 400 total points
ID: 39285007
Being new to any language is challenging enough in and of itself. When it comes to debugging, there are some less obtrusive methods in use by more seasoned programmers of languages like PHP & Perl, whereby the programmer will just drop in some dumping of variables to determine what's taking place at a given point in the execution of a script or program.

That having been said, I personally choose to  not use formal debuggers for languages like PHP & Perl as the setup is usually far more time intensive than just injecting a single line of code I can use to quickly ascertain what's up at that point in my execution.

If you really desire going the route of a formal debugger, then yes, you will need to install xdebug and perform the integration/setup of it into your IDE before you can get it to work at any level of productive use.

In PHP, I like to use the following snippet for my debugging;

# I use this when I want the output to appear in a browser
print "<pre>"; print_r($var); print "</pre>";
# I use this when I want the output to appear in a console
print_r($var);

Open in new window


Hope this helps.

~AB
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 100 total points
ID: 39285386
0
 

Author Closing Comment

by:sukhoi35
ID: 39286345
Thanks!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question