Jump to content

ashly

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by ashly

  1. Are you trying to delete the file from the source folder after copying? How do you want to copy the file.. copy to another location or move to another location?
  2. Are you using any date format string in select statement like : to_char(date_field, 'dd-mm-yyyy') AS date_field_formatted if so , you have to use order by with 'date_field' not the 'date_field_formatted'
  3. You have given: $to="[email] msn@flash-online-games.co.uk"; this should be: $to="msn@flash-online-games.co.uk"; pls try it and let me know if there is any result?
  4. what are you talking about? php or html?
  5. try the code below: <html> <body> <form action="" method="post"> Username: <input name="username" type="text" size="10" maxlength="30" VALUE="This is my text username"/> Password: <input name="password" type="password" size="10" maxlength="4" /> <input type="submit" value="Login" /> </form> <?php echo $_REQUEST['username']; echo $_REQUEST['password']; ?> </body> </html> hey, just enter some values for Username and Password columns and click on the Login button. You will get something printed ..sure... is it?
  6. anyway, my problem is not that function.. i thought it was because of memory limit.. my script doesn't complete the execution and it results in "Network Error (tcp_error) ". I have to make around 6 pdf's in a single script. but there is a large amount of data.. around 1500 records in each pdf. but i cannot even finish one pdf. can anyone help me to sort out the problem? Thanks Ashly
  7. Use the code below in the top of the page And do your calculation after these lines and do what do you want to do... $cl = $_POST['cl']; $alc = $_POST['alc']; $styrke = $_POST['styrke'];
  8. now i changed the code in test.php as mail('mymail@host.com', 'My Subject', 'Test message'); but i don't get the email.. the server is configured for mail fuction also..
  9. Line number 17 is passthru(/var/www/myhost/test.php);
  10. i read the manual completely..but no information there. As the code there is: <? print "reached here"; ?> The script test.php should have to print "reached here". Is it?
  11. what about the memory_get_usage() function? is it the real memory space used by the script? bcse i got a value -51269756 when i checked in my script.. what is the mening of -ve value? and it makes problem for me to execute the script completely. i have increased the ini setting value for memory_limit and set it to 500 MB..
  12. First one makes Parse error like: Parse error: syntax error, unexpected '/', expecting ')' in /var/www/myhost/execfunctioncaller.php on line 17 and the second one has no output...
  13. Can anyone explain how to free the memory in PHP script after a block of code is executed? I am using PHP5 on apache server
  14. My code is like this: passthru("/var/www/myhost/test.php"); but it doesn't workout.. any idea?
  15. As your form and iframe are in the same page, you are calling another page to iframe. so there is no possiblity to get the request variable in the called page. you have to pass the value of the $item to the called page each time. use something like this: $item = $_POST['item']; ...... <iframe src="mypage.php?item=<?= $item ?>"></iframe>
  16. Use : <? echo "test<br>" . "test2"; ?>
  17. what i am looking for is to get an example of usage of passthru() function to execute a php script from another php script..
  18. ok..it is nice.. thanks.. How do i use passthru() function to execute a php script?
  19. Use like this: $headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n"; mail($mailAddress, $mailSubject, $mailMessage, $headers); I hope this will work out.. Cheers Ashly
  20. Hi, I have to execute multiple PHP scripts conditionally from a single PHP script, that is executed by a cron. Actually i wanted to do is instead of using require or include for each page, execute each page directly from the script like a function call. is there any methods in PHP? if anybody have any idea, pls reply.. Thanks Ashly
  21. i am running it through the browser.. tried each pdf's separately.. but the same problem exists..
  22. Hi, I am working with php5 and i have a script that should have to be executed as a cron. The main purpose of the script is to send reports as pdf files to different users. The problem is when i generate a number of pdfs, the script fails to complete the process and results in display a page with network error. It is creating around 6 types of pdf files in each execution, each having an average size of 500 KB. The memory_get_usage() returns the value -51507298 after a function call in ezpdf library. just before the function call the value for the same was 1967298. Default php.ini setting for memory_limit is 50 MB. I have set the memory limit in the script to 500 MB. ini_set("memory_limit", "500M"); I am using the library ezpdf to generate pdf files. Can anyone help me to sort out the problem...? Thanks in advance Ashly
  23. Hi That's Great... thanks you so much for the solution.. That works as you explained.. but again there is some problem arises when i use the code like this: [code] [somecode] function getSize($userIDArr) { $arrSize = sizeof($userIDArr); } [somecode] function getUserNames($userIDArr) { for($i=0; $i < sizeof($userIDArr); ++$i) { $userNamesArr[$i] = $userIDArr[$i]; } return $userNamesArr; } [/somecode] [/somecode] ------------------------ some comment in between ------------------------ [somecode] function getCustomerNames($custIDArr) { for($j=0; sss < sizeof($custIDArr); ++j) { $customerNameArr[$j] = $custIDArr[$j]; } return $customerNameArr; } [/somecode] [/code] but I need the result as follows: [code]<abc> function getSize($userIDArr) { $arrSize = sizeof($userIDArr); } [somecode] function getUserNames($userIDArr) { for($i=0; $i < sizeof($userIDArr); ++$i) { $userNamesArr[$i] = $userIDArr[$i]; } return $userNamesArr; } [/somecode] </abc> ------------------------ some comment in between ------------------------ [abc] function getCustomerNames($custIDArr) { for($j=0; sss < sizeof($custIDArr); ++j) { $customerNameArr[$j] = $custIDArr[$j]; } return $customerNameArr; } [/abc] [/code] is there any solution for this? Thanks Ashly
  24. Hi, I am working with PHP 5.0 . I have a string like this: [code][somecode]   function getSize($userIDArr)   {       $arrSize = sizeof($userIDArr);   }   [somecode]   function getUserNames($userIDArr)   {       for($i=0; $i < sizeof($userIDArr); ++$i)       {           $userNamesArr[$i] = $userIDArr[$i];        }       return $userNamesArr;   }   [/somecode] [/somecode][/code] I need to replace only the outer tag pair [somecode] [/somecode] with <abc> </abc> The result should look like: [code]<abc>   function getSize($userIDArr)   {       $arrSize = sizeof($userIDArr);   }   [somecode]   function getUserNames($userIDArr)   {       for($i=0; $i < sizeof($userIDArr); ++$i)       {           $userNamesArr[$i] = $userIDArr[$i];        }       return $userNamesArr;   }   [/somecode] </abc>[/code] If anyone have any idea, please help me to solve this. Thanks in advance Ashly
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.