FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Php Include bug in firefox
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Php Include bug in firefox [message #169578 is a reply to message #169572] Sat, 18 September 2010 11:00 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 9/18/2010 2:10 AM, Michael Vilain wrote:
> In article<i71j33$hrb$1(at)news(dot)eternal-september(dot)org>,
> Mike S<mscir(at)yahoo(dot)com> wrote:
>
>> On 9/17/2010 7:05 PM, GarryJones wrote:
>>> Is there another way of including a secondary file to a first?
>>>
>>> I have just started to use ajax, it loads in php pages that are
>>> written on the server.
>>>
>>> My ajax script is at the bottom of this for info only, there is not
>>> problem with the ajax code, it works perfectly except for one little
>>> problem caused by php.
>>>
>>> One of the documents I am reading from the server calls another file
>>> with php like this.
>>>
>>> <? include ("ct04a.php") ?>
>>>
>>> This works on msie. This does not work on firefox!! Yeah I know I can
>>> tell my users to stop using firefox (and mac and iphone and linux and
>>> crome and safari), but I WOULD like this to work in firefox.
>>>
>>> Is the problem a bug in php or ajax or javascript?
>>>
>>> Is there another php command that I can test to include a secondary
>>> php file
>>>
>>> <script language=JavaScript>
>>> var xmlhttp;
>>> function loadXMLDoc(url)
>>> {
>>> xmlhttp=null;
>>> if (window.XMLHttpRequest)
>>> {// code for Firefox, Opera, IE7, etc.
>>> xmlhttp=new XMLHttpRequest();
>>> }
>>> else if (window.ActiveXObject)
>>> {// code for IE6, IE5
>>> xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
>>> }
>>> if (xmlhttp!=null)
>>> {
>>> xmlhttp.onreadystatechange=state_Change;
>>> xmlhttp.open("POST",url,true);
>>> xmlhttp.send(null);
>>> }
>>> else
>>> {
>>> alert("Email if it is a big problem");
>>> }
>>> }
>>>
>>> function state_Change()
>>> {
>>> if (xmlhttp.readyState==4)
>>> {// 4 = "loaded"
>>> if (xmlhttp.status==200)
>>> {// 200 = "OK"
>>> document.getElementById('T1').innerHTML=xmlhttp.responseText;
>>> }
>>> else
>>> {
>>> alert("Problem med datahämtning:" + xmlhttp.statusText);
>>> }
>>> }
>>> }
>>> </script>
>>
>> How can an include cause a problem with the javascript executing correctly?
>
> The correct syntax is
>
> <?php include ("ct04a.php"); ?>
>

If his host has short tags enabled (not recommended, but a lot do), his
code is perfectly valid. If they didn't, his code wouldn't work no
matter what the browser is.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: @sessionstart()
Next Topic: Advanced SQL injection complete tool pack(tutorials,scanners,admin finder,shells,md5)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 17:19:57 GMT 2024

Total time taken to generate the page: 0.05922 seconds