Finding the Errors on Your Site



Get Web Design Tips and Tricks on mps-web-design.com. Finding the Errors on Your Site topic will increase your understanding on Web Design Tips and Tricks. We at mps-web-design.com only provide news, articles, information in Web Design Tips and Tricks. Web Design Tips and Tricks at mps-web-design.com provides the most up to date news and articles. If you have questions please do not hesitate to contact us.

When you are building your site, and try to test it in a browser, do
you sometimes (or perhaps more often) get an error message telling
you that your site contains a script error, and would you like to
continue running scripts on the page - yes or no?

If so, look at that screen before discounting it - it should tell you
which line has a syntax error or whatever problem it tells you. You
can now look for that line to correct it - but finding it might not be
as easy as you'd think. Blank lines do count, and the count might
piece some lines together which you would no expect. One way to
find the line in question is to go near the line you think you counted
to.

When you are there, see which line it tells you the error is at. For
example, if your error is at line 33, you can go to about line 29 and
then add a blank line. Again try to view the page - which line does it
tell you the error is on now? Does it say line 33 again? If so, you
have added the blank line AFTER the line with an error. Go up
about 5 lines and try it. If it said line 34, then the line with the error
is after the blank line. Sneak up on it by taking out the blank line and
moving up a couple lines. Try it again. If it now says line 33, you
know you just passed the line with the error. Look at the couple of
lines you moved through. If it says line 34 had the error - move up a
couple more lines and try again. You might not pinpoint the EXACT
line, but you will get within 2-3 of it - look at it carefully and find
the error in it. It can be a ' where it should be ' - or an incomplete
code that didn't close (no ) or a misspelling of a code - any
number of things. Try making changes to it and see if that makes
a difference in taking out your error message.

Now you can clean up your site, once you have found the lines with
the errors. If you are fortunate enough to have a good HTML editor
that will count out lines, then you need not hunt for them, but this is
a good trick to try if you don't get an accurate line count.



Scan And Fix Errors In Windows Registry. - Error Nuker - Scan your Pc for Free to Check for Windows Registry Errors - by SpyWare Nuker Team - no#1 money maker since 2002.
Racing Secrets. - Information on finding a Nascar job, finding sponsors and engine tips.

Firing a function from your browser

The concept is as simple as firing a function from your browser, and it leans on PHP's call_user_func_array.

I'm going to outline the concept as I have implemented it. This exact implementation may not work in your case, but perhaps you can adapt it to do so.

if(isset($_GET['f']) && function_exists($_GET['f'])) {
$func = $_GET['f']; // Get function name.
unset($_GET['f']); // Drop function from from get.
// Fire and print function, passing 
// remaining GETs as function parameters.	
print_r(call_user_func_array($func, $_GET)); 
exit;
}

In our CMS/Framework, we set up a controller with the code from above to respond at a given URL, for example http://www.example.com/__FOO. By passing a function name as a GET variable, in this case 'f', and the parameters necessary for that function to work as subsequent GET parameters, the result of that function will be printed to the screen.

So, http://www.example.com/__FOO?f=hello_foo&a=world would fire the function hello_foo('world'), perhaps printing Hello World! to the screen.

This allows for a quick and dirty test of a given function, and can be done remotely on a live site, if necessary, without touching any files or whatnot.

We hide this behind an authorization wall and also clean our parameters before they get to this level, so if you try this, keep these points in mind.



Article Index: | 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79


More Articles:


1. Finally, someone made the web design process easy to understand
The best thing that can be done for web design is to leave it to the designers! That is what a lot of folks particularly internet marketers like me believe about the web design process. When you visit a large web design company the chances are they outsource the work to a freelance website designer just like I do in the majority of cases. You may have a current web site design project, you may be updating an existing site, or just interested in learning new skills. If so then this article will …

2. Web Page Real Estate 101
'The value is in the land' “Location! Location! Location!” “Invest in land..they aren't making any more of it' Those real estate axioms are well known and are even truer today than ever. But they also are applicable to your website. We hear and read every day how our websites are competing with millions of others in the great race to be found online. We have to first work, work and work some more to get our piece of 'web real estate' in a position to be found through search engine management an…

3. Price is Right: Web / Graphic Design By Chris Rohrer
Web design is something that most people think only big companies can do. Let me just say that this is wrong. Anyone can build a web site. It just will not look as professional. What people do not know is that these companies over charge in price. Some companies will even use a web template to build off of. They have very little customization done to them.I find that the best work is done by the small independent people working on there own. I have researched the internet looking at other pric…

4. Tips for Business Websites By Mihaela Lica
Web Design, as design in general, is subject to changes and trend influences. Words like “fresh, modern, innovative” seem to conquer the world of design while artists strive to discover new directions. Websites are different: objectives, resources and users are the factors shaping the profitability of a site.The truth is that web design is not easy. There are several factors shaping the web layout and the architecture of a site, some see them as rules, others believe there are no rules at all.…