hi
I write a simple script for test header statement.I expect my script show a warning message and dont transmit to another page but unfortunately, i am transmited to another page.
my question is this, is there any setting in php.ini that is related with blank space that is sent to the browser before header statement .
my experimental script is as follow as: -
<?php
-
ini_set("error_reporting", E_ALL);
-
ini_set("display_errors", "on");
-
?>
-
<?php
-
$a = 'ali';
-
-
if($a == 'ali') {
-
header("Location: index2.php");
-
}
-
?>
-
<h1>you dont transmit to another page</h1>
-
thanks alot for your help.
3 1985
You haven't echoed anything in your script before you call the header() function.
Also: - <?php
-
ini_set("error_reporting", E_ALL);
-
ini_set("display_errors", "on");
-
?>
-
<?php
No need to end the code block then start it again immediately after, remove the end of the first one and the start of the second one.
Basically, you haven't output anything, so your script is working as it should. This would fail (most times): - <?php
-
ini_set("error_reporting", E_ALL);
-
ini_set("display_errors", "on");
-
$a = 'ali';
-
echo $a;
-
if($a == 'ali') {
-
header("Location: index2.php");
-
}
-
?>
There are certain setups on which this would still work.
hi
i close php tag and open it again deliberately because i expect to get a warning or notice for a space between closing and opening tag that is sent to browser and i dont must transmit to next page.
thanks alot
If you don't want to redirect then remove the redirect code.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Buz |
last post by:
I am having a problem with extra, unwanted space showing
up on my web form tables. I've tried hand coding and can
get the htm file to display fine. But as soon as I bring
the form into Visual Studio, convert it to an aspx web
form, and insert my user controls, I start getting extra
blank space between my rows, even when I give an
explicit "height" attribute.
The problem seems to occur with tables that have rowspans
and/or user...
|
by: barb28 |
last post by:
Hello, sometimes I have noticed that
in web addresses, the number:
20%
will show up in the address. I think this is
somehow related to a 'blank space', but am
unsure, does anyone know about this?
I have seen it mostly I think with netscape,
|
by: Penguin |
last post by:
Using Access 97, I've created a grading sheet. To save space, the
subjects
are in vertical columns on a sub-report, like so:
Math Spelling Reading
N C T A A E
U A I C C X
M L M C C P
B C E U U R
E U S R R E
|
by: Amir |
last post by:
I really hope someone can explain this behavior. I have spend quite a bit of
time and tried a bunch of things, so far nothing has worked.
I have a page on which I have a datagrid with template columns. I
perform regular expression validations in the EditItemTemplate for the
fields that require such validation. The datagrid is inside a div tag
to make it scrollable. I have implemented the solution to freeze header
for this grid - the...
|
by: Bill Nguyen |
last post by:
I tried in vain to add blank space to the end of couple variables as below:
mPadding = Convert.ToChar(" ")
mdriverBegin.PadRight(16, mPadding)
mdriverEnd.PadRight(16, mPadding)
mSitekey.PadRight(4, mPadding)
| |
by: samyuktha takkellapati |
last post by:
create or replace trigger emp_trigger
after update or delete on employee
for each row
begin
if updating then
insert into empupdate(empno,ename,job,mgr,sysdate,sal,comm,deptno) values(:old.empno,:old.ename,:old.job,:old.mgr,:old.hiredate,:old.sal,:old.comm,:old.deptno);
elsif deleting then
insert into empdelete(empno,ename,job,mgr,sysdate,sal,comm,deptno)...
|
by: monica4rdecos |
last post by:
Hi,
I am developing a website. Its width is fixed and is 1000px. I want to avoid horizontal scroll bar in a standard 1024 X 768 browser. So i fixed it as 1024px width. But in firefox a blank space is displayed on the right side of the site and as a result a horizontal scroll bar is coming. I have given width of the body as 1000px and i am using a table inside body whose width is 100% and i made sure that contents inside table would not...
|
by: voroojak |
last post by:
HI
i have a proble with the blank space.
i have a column for phonenumber. in phone number table each entry may have a different format.
i mean one entry can be like this 228 566 59878 and the other one can be 457748 6958 or 258 265897. what i wantto do is that i want all the number stick together and be like this 256987412557. i know that with ltrim or rtim i can remove teh space from the begining or end.
thanks alot
|
by: Tessy Mithu |
last post by:
Am trying to print a receipt from VB6.0 with MS.Access as db.
While generating the data report iam getting blank spaces between detailed section and Bottom margin of the report.
Required to know is there any possibilities which i can remove these blank space by coding.
Following codes are used for printing report.
With DO_Receipt.Sections(1).Controls
.Item("Lbl_Date").Caption = Frm_Counter.Lbl_RcptDate.Caption
...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |