473,379 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

a debug technique enquiry

Dear all,

when i add

include('abc.php');

in the last line of 'def.php',

the codes in abc.php were once executed. now after series of changes
(including setting php.ini), i don't know which one makes a bug.

here is the starting lines of abc.php:
<?php
// indicate test version or public version.
// 0: prompt 1: test 2: Web
$type = 2;

print "<h2>Welcome to this page</h2>\n";

exit;

....


the print is to see if it works or not but it even doesn't print out.
permission of abc.php hasn't been changed and every time i run def.php, the
timestamp of abc.php shows an update accordingly.

What can i do in abc.php to debug?

thanks a lot.
Jun 3 '06 #1
4 1208
"vito" <vi*********@yahoo.com.tw> wrote in message
news:e5***********@justice.itsc.cuhk.edu.hk...
Dear all,

when i add

include('abc.php');

in the last line of 'def.php',

the codes in abc.php were once executed. now after series of changes
(including setting php.ini), i don't know which one makes a bug.

here is the starting lines of abc.php:
<?php
// indicate test version or public version.
// 0: prompt 1: test 2: Web
$type = 2;

print "<h2>Welcome to this page</h2>\n";

exit;

...


the print is to see if it works or not but it even doesn't print out.
permission of abc.php hasn't been changed and every time i run def.php,
the timestamp of abc.php shows an update accordingly.

What can i do in abc.php to debug?

thanks a lot.


Start by fixing the syntax at the end of the file. It's "?>" not simply
">".
Jun 3 '06 #2
> Start by fixing the syntax at the end of the file. It's "?>" not simply
">".


a typo only. the original files each have that one.
Jun 4 '06 #3
Rik
vito wrote:
the print is to see if it works or not but it even doesn't print out.
permission of abc.php hasn't been changed and every time i run
def.php, the timestamp of abc.php shows an update accordingly.

What can i do in abc.php to debug?


First of all: You have display errors on, and error_reporting set to E_ALL?

Second, it's probably def.php that needs to be debugged. Try a simple
include file:

<?php print("untill here it works"); ?>
And move it up in your def.php untill it works, the error is somewhere
below.

Cutting out large pieces of code in a copied version untill you can
reproduce the problem with a minimal amount of code is always very
clarifying.

Grtz,
--
Rik Wasmus
Jun 4 '06 #4
Rik
vito wrote:
Start by fixing the syntax at the end of the file. It's "?>" not
simply ">".


a typo only. the original files each have that one.


The '?>' is often reduced to '>' by newsreaders, highly probable it was in
the code you sent :-)

Grtz,
--
Rik Wasmus
Jun 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dan Perl | last post by:
Is there a mechanism or an idiom for adding code for debugging so that it can easily be removed in the production code? I am thinking of something similar to the C/C++ preprocessor statements with...
3
by: Stephanie | last post by:
I have a problem that I am trying to solve. We have a huge product with a whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by ASP app. When I attempt to add features or fix...
1
by: John | last post by:
Hi I have an enquiry web form with several fields to which I also need to link a grid. As it is an enquiry form I don't necessarily want to bind the grid to a db. Ideally I want to allow user to...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
7
by: Bart Roozendaal | last post by:
I am using a C# assembly in Delphi.Win32 using the com interop services. This works fine, but I am looking for a way to debug the C# assembly. When using a Delphi program as a host for the...
1
by: gfergo | last post by:
Good Morning, I seem to be having a problem. I thought I could display detailed debugging information (including file name and line number) on a page using two different methods: 1.)...
5
by: =?Utf-8?B?SmltIFJvZGdlcnM=?= | last post by:
My question is simple: How does one debug ASP Classic with Microsoft Visual Web Developer Express 2005 ("VWD")? Looming in the back of anyone's mind when you see a posting like this on any...
2
by: punitshrivastava | last post by:
Hi to All. I am Punit Shrivastava.I am working in Asp.As i am new in this technology please help me. I want to create enquiry form in Asp. For this i code like this: <form name="enquiry"...
9
by: vivek | last post by:
Hi i have used some debug macro and called several times(hundreds) in the code. The purpose of the macro was to print the values at that time to the screen Now that i have finished...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.