Search found 13 matches

by jewelthief
Sat Jan 23, 2010 1:40 pm
Forum: PHP - Code
Topic: Php echos whole included file.
Replies: 2
Views: 393

Re: Php echos whole included file.

functions.php file     function UdateAtServer($xmlDoc,$i)     {           $num_of_subTasks = $xmlDoc->getElementsByTagName("abc")->item($i).length;                             } main.php file require_once("functions.php");         if($num_of_tasks > 0)         {             $con ...
by jewelthief
Sat Jan 23, 2010 1:15 pm
Forum: PHP - Code
Topic: Php echos whole included file.
Replies: 2
Views: 393

Php echos whole included file.

I am very new to php. I have written my functions in separate file and included that file in my main .php file. Now when I get responseText ( I am working with Ajax) whole of the included file gets echoed i.e. code. why is this behavior of php and how should i make sure that php only echos what i te...
by jewelthief
Mon Jan 18, 2010 12:37 pm
Forum: PHP - Code
Topic: Problem with XML serialization.
Replies: 2
Views: 494

Re: Problem with XML serialization.

Sorry I pasted the wrong code in previous post. Here is the one i am actually using. session_start();     ini_set("include_path", ini_get('include_path').PATH_SEPARATOR.'./PEAR/'.PATH_SEPARATOR.'./PEAR/PEAR/' );     if( !isset( $_GET["sess"] ) )     {         $xmlstring = file_ge...
by jewelthief
Mon Jan 18, 2010 12:26 pm
Forum: PHP - Code
Topic: Problem with XML serialization.
Replies: 2
Views: 494

Problem with XML serialization.

Here is my code. <?php     session_start();     ini_set("include_path", ini_get('include_path').PATH_SEPARATOR.'./PEAR/'.PATH_SEPARATOR.'./PEAR/PEAR/' );     if( !isset( $_GET["sess"] ) )     {         $xmlstring = file_get_contents("php://input");           $xml = new ...
by jewelthief
Wed Sep 09, 2009 6:41 pm
Forum: General Discussion
Topic: Php email problem at web host.
Replies: 2
Views: 368

Re: Php email problem at web host.

for that very reason I added whole PEAR package in my www directory and set include path to it but stilll it is giving error. Anyway i'll contact my web host. lets see what they say.
by jewelthief
Wed Sep 09, 2009 1:25 pm
Forum: General Discussion
Topic: Php email problem at web host.
Replies: 2
Views: 368

Php email problem at web host.

Hello! I am trying to send emails from my website to email address. I have used PEAR and its all working fine when i am testing it on local host (receiving emails fine) but as soon as i upload my site on web host. It shows me an error: 500 - Internal server error. There is a problem with the resourc...
by jewelthief
Fri Sep 04, 2009 2:36 am
Forum: PHP - Code
Topic: Php fgets() and trim()
Replies: 4
Views: 1228

Re: Php fgets() and trim()

oops. such a simple mistake. Thanks anyway
by jewelthief
Thu Sep 03, 2009 2:03 pm
Forum: General Discussion
Topic: Which form sent the data?
Replies: 2
Views: 667

Re: Which form sent the data?

thanks. done.
by jewelthief
Thu Sep 03, 2009 1:22 pm
Forum: General Discussion
Topic: Which form sent the data?
Replies: 2
Views: 667

Which form sent the data?

Hello!

I have 2 forms in one html page with same action="abc.php" property. How can i find in abc.php that which form sent the data?

any help would be appreciated.
by jewelthief
Thu Sep 03, 2009 12:47 pm
Forum: PHP - Code
Topic: Php fgets() and trim()
Replies: 4
Views: 1228

Re: Php fgets() and trim()

<?php             $str= $_POST["field1"];             $file = fopen("abc.txt","r");             $flag = 0;             while( !feof($code_file) )             {                 $line = fgets($file);                 rtrim($line);                 if( strcmp( $str, $line )...
by jewelthief
Thu Sep 03, 2009 12:38 pm
Forum: PHP - Code
Topic: Php fgets() and trim()
Replies: 4
Views: 1228

Php fgets() and trim()

Hello! I am reading from a file called abc.txt. It has 3 lines containing of one word each. when I loop through these lines with fgets() function and check the length of the strings returned, I get the length 2 more than the actual length is. I have checked the ascii codes of those last two characte...
by jewelthief
Sat Aug 29, 2009 7:36 am
Forum: General Discussion
Topic: How difficult would be the transition?
Replies: 3
Views: 731

Re: How difficult would be the transition?

Thanks for the information. I am really enlightened. I'll see what can i do in Php. Thanks again.
by jewelthief
Sat Aug 29, 2009 1:53 am
Forum: General Discussion
Topic: How difficult would be the transition?
Replies: 3
Views: 731

How difficult would be the transition?

Hello! I have done some work in Asp.net but now thinking to move to Php. I have only seen the basic tutorials of Php for now and it seems to me difference in syntax only. The outermost structure looks the somewhat same. So i want you guys to tell me how difficult my transition from Asp.net to Php wo...