[PHP] create htaccess.
Hello php-general, I have a question about htaccess (I cannot modify httpd.conf in the server since I just host on server, not dedicated one. I want to be able to convert from : www.mysite.com/index.php?f=module_a.php into www.mysite.com/index/module_a.php and am I able to do : www.mysite.com/index.php?f=module_a.php?name=abcaddress=bcdefgh ? thx -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: create htaccess.
Hello Matthew, Monday, December 6, 2004, 11:33:28 AM, you wrote: MWOP In you .htaccess: MWOP File index MWOP ForceType application/x-httpd-php MWOP /File MWOP DirectoryIndex index MWOP Then, in your script, you'll need to access the PATH_INFO environment MWOP variable via the $_SERVER array to parse out the argument(s): MWOP $pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO MWOP $pi = substr($pi, 1);// Remove the opening slash MWOP $args = split('/', $pi); // Create array of arguments MWOP $f= $args[0]; // Grab first argument MWOP -- MWOP Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] MWOP Webmaster and IT Specialist | http://www.garden.org MWOP National Gardening Association| http://www.kidsgardening.com MWOP 802-863-5251 x156 | MWOP http://nationalgardenmonth.org I just want to clarify, if I type: www.mysite.com/article/file/19911/year/2004 means: www.mysite.com/article.php?file=19911year=2004 right ? :) and i have to put this script on my article.php, is it right ? $pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO $pi = substr($pi, 1);// Remove the opening slash $args = split('/', $pi); // Create array of arguments $f= $args[0]; // Grab first argument thank you ... -- Best regards, adwin www.kuya-kuya.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] handling tag and quote (' )
Hello php-general, I have question for you :) Is there suggestion about how to remove html tag, javascript and quote (' ) from user's input at the same time ? thx ;) -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] email templating system
Hello php-general, Currently I use Smarty for page templating system, and I am happy with this. But is there any way to produce a file with smarty instead of displaying it as a page. I want to use this as email templating, I want to create an email and I have a template like smarty and I want to assign it just like smarty. Is there any templating system that suitable for me ? Example: [email.tpl] Hello {$user}, Welcome to {$name_of_web} regards, {$system_administrator} [email.php] $email-assign('user', $user); $email-assign('system_administrator', $system_administrator); $email-assign('name_of_web', $name_of_web); $email-send('/templates/email.tpl') ; -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] email templating system
Hello John, Tuesday, October 5, 2004, 11:43:34 AM, you wrote: JH X-Apparently-To: [EMAIL PROTECTED] via JH 216.109.117.233; Mon, 04 Oct 2004 18:44:39 -0700 JH X-Originating-IP: [216.92.131.4] JH Return-Path: JH [EMAIL PROTECTED] JH Received: from 216.92.131.4 (HELO pb1.pair.com) (216.92.131.4) JH by mta127.mail.sc5.yahoo.com with SMTP; Mon, 04 Oct 2004 18:44:39 -0700 JH Received: (qmail 77197 invoked by uid 1010); 5 Oct 2004 01:44:21 - JH Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm JH Precedence: bulk JH list-help: mailto:[EMAIL PROTECTED] JH list-unsubscribe: mailto:[EMAIL PROTECTED] JH list-post: mailto:[EMAIL PROTECTED] JH Delivered-To: mailing list [EMAIL PROTECTED] JH Received: (qmail 77146 invoked by uid 1010); 5 Oct 2004 01:44:21 - JH Delivered-To: [EMAIL PROTECTED] JH Delivered-To: [EMAIL PROTECTED] JH X-Ironport-AV: i=3.85,122,1094443200; JHd=scan'208; a=380869305:sNHT13028200 JH Message-ID: [EMAIL PROTECTED] JH Date: Mon, 04 Oct 2004 21:43:34 -0400 JH From: John Holmes [EMAIL PROTECTED] JH User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) JH X-Accept-Language: en-us, en JH MIME-Version: 1.0 JH To: adwinwijaya [EMAIL PROTECTED] JH CC: [EMAIL PROTECTED] JH References: [EMAIL PROTECTED] JH In-Reply-To: [EMAIL PROTECTED] JH Content-Type: text/plain; charset=windows-1252; format=flowed JH Content-Transfer-Encoding: 8bit JH Subject: Re: [PHP] email templating system JH adwinwijaya wrote: Hello php-general, Currently I use Smarty for page templating system, and I am happy with this. But is there any way to produce a file with smarty instead of displaying it as a page. I want to use this as email templating, I want to create an email and I have a template like smarty and I want to assign it just like smarty. Is there any templating system that suitable for me ? Example: [email.tpl] Hello {$user}, Welcome to {$name_of_web} regards, {$system_administrator} [email.php] $email-assign('user', $user); $email-assign('system_administrator', $system_administrator); $email-assign('name_of_web', $name_of_web); $message = $email-fetch('/templates/email.tpl'); JH mail($to,$subject,$message); no, This is not what I mean. I know about mail() function. I just want to create email, but I want it like smarty, have if, for etc in the email template. -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] email templating system
Hello John, Tuesday, October 5, 2004, 11:59:19 AM, you wrote: JH Yes, that is what you mean. fetch() is going to parse the smarty email JH template (where you have your IF, FOR, smarty variables, etc) and return JH the parsed template to you. Then you stick that into mail(). JH If you want to use $email-send(), then you'll have to modify the smarty JH class or write a class that extends smarty and implements the send() JH method. Oh .. that's right John, I just know that smarty has fetch() method :( ... thanks for your help :) -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with header-dispotition in IE
Hi all ... I have script that looks like : if(file_exists($filename)){ $len = filesize($filename); //header(Content-type: attachment/pdf); header('Content-Type: application/pdf'); //header(Content-Type: application/octet-stream); header(Content-Type: application/force-download); header(Content-Length: $len); if(preg_match(/MSIE/, $_SERVER[HTTP_USER_AGENT])){ header(Content-Disposition: attachment; filename=.$name..pdf,pdf); }else { header(Content-Disposition: attachment; filename=.$name..pdf,pdf); } //header(Content-Disposition: attachment; filename=personal_inventory_forms.pdf); readfile($filename); } else { echo $filename ; echo ' ERROR : file is not exist' ; } This script works very well on Mozilla, Opera and Safari..but doesnt work with IE. can someone help me to solve this problem ? thx -- Best regards, adwin www.kuya-kuya.net There is a story living in us that speaks of our place in the world. It is a story that invites us to love what we love and simply be ourselves. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] problem with header-dispotition in IE
Hello Marek, Monday, September 20, 2004, 6:58:46 PM, you wrote: MK adwinwijaya wrote: Hi all ... I have script that looks like : if(file_exists($filename)){ $len = filesize($filename); //header(Content-type: attachment/pdf); header('Content-Type: application/pdf'); //header(Content-Type: application/octet-stream); header(Content-Type: application/force-download); header(Content-Length: $len); if(preg_match(/MSIE/, $_SERVER[HTTP_USER_AGENT])){ header(Content-Disposition: attachment; filename=.$name..pdf,pdf); }else { header(Content-Disposition: attachment; filename=.$name..pdf,pdf); } //header(Content-Disposition: attachment; filename=personal_inventory_forms.pdf); readfile($filename); } else { echo $filename ; echo ' ERROR : file is not exist' ; } This script works very well on Mozilla, Opera and Safari..but doesnt work with IE. can someone help me to solve this problem ? MK I suppose you are trying to force IE to download the pdf file, but it is MK always displaying it - you did not tell what is your problem. MK IE determines the type of file from the extension, if it is a known MK extension it ignores the content-type header. You might want to try MK adding space char after the filename, I've heard it works. MK PS: Second param to header should be bool The error that I got just IE cannot download download.php from mysite.com .. IE was not able to open this site and bla bla bla. No hint in the error. I think the problem that I faced is with SSL. I try http://www.wazzup.co.nz/tutorials/protect_pdf/index.php and it didnt work on my web Why IE cannot work with SSL mode to download file ? Is there any solution ? -- Best regards, adwin www.kuya-kuya.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] download pdf using php script
Hello PHP Users, I have files (that protected from direct download) and I put it outside public_html/ directory (outside web server directory). and the people from outside could access the file by typing: www.myweb.com/download.php?filename=xzy.pdf can someone give me hint how to do this ? thank u -- Best regards, adwin www.kuya-kuya.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] complex array and smarty
Hello all, Assume I have array that looks like : Array( 'type'-'Fiction', 'notes'-'Fiction books from a-z', 'list'- Array( 'list'- [0]-array( 'title'-'xzy', 'id'-'1') [1]-array( 'title'-'abcd', 'id'-'2') ) ) Now, I want to display it using smarty os it looks like --- Books Result: 1. Type: Fiction Notes: bla bla bla bla -- ID | Title -- 1 | xzy 2 | abcd -- 2. Type: Non-Fiction Notes: bla bla bla bla -- ID | Title -- 3 | ABCDEFEGH 4 | LALALALLA -- Etc ... can I do like that with smarty ? and how to do that ? I knew to use array, but for this array, I dont know how to do that thx regards adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] complex array and smarty
Hello John, Tuesday, August 10, 2004, 12:35:30 AM, you wrote: JWH From: adwinwijaya [EMAIL PROTECTED] Assume I have array that looks like : Array( 'type'-'Fiction', 'notes'-'Fiction books from a-z', 'list'- Array( 'list'- [0]-array( 'title'-'xzy', 'id'-'1') [1]-array( 'title'-'abcd', 'id'-'2') ) ) Now, I want to display it using smarty os it looks like --- Books Result: 1. Type: Fiction Notes: bla bla bla bla -- ID | Title -- 1 | xzy 2 | abcd -- 2. Type: Non-Fiction Notes: bla bla bla bla -- ID | Title -- 3 | ABCDEFEGH 4 | LALALALLA -- can I do like that with smarty ? and how to do that ? I knew to use array, but for this array, I dont know how to do that JWH You need to come up with a better way to format that array based on how you JWH want to display it. You can then use {foreach} JWH http://smarty.php.net/manual/en/language.function.foreach.php JWH ---John Holmes... yeah, I know it already, I also tried it using section but I dont know how to translate this code in php into smarty. ?php foreach($Books as $key=$item) { if($key != 'List') echo $key.' = '.$item ; else foreach($Books['List'] as $key2=$item2) echo $key2.' = '.$item2 ; } ? I tried like this : {foreach name=main key=key item=books from=$Books} {if $books.type != ''} table border=1 tr td colspan=3{$books.type} - {$books.wd_type}/td /tr tr tdNo/td tdName/td tdAction/td /tr {foreach name=inner key=key2 item=listbook from=$books.List} tr td {$listbook.id}- {$listbook.name} /td /tr {/foreach} /table {/if} {/foreach} -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Bug ?
Hi... I found a bug (may be) I tried to do like this: $temp = $country_list[$country_symbol['AU']] ; this didnt work, so I have to change to : $symbol = $country_symbol['AU']; $temp = $country_list[$symbol] ; is this PHP bug ? -- Best regards, adwinwijaya mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tracking ip and its location
Hello PHP, Is there any function/class to search the location based on ip address ? For example, I got ip 144.xxx.xxx.xxx and it can displaying that IP comes from X country. thxs -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] tracking ip and its location
Hello Tom, Friday, May 14, 2004, 7:21:39 PM, you wrote: TC Try: TC http://www.1phpstreet.com/vb/scripts/ShowCode.asp?txtCodeId=318lngWId=8 TC Regards, TC Tom so, where i can download the list of countries and its ip address ? thx -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with SSL
Hello php-general, Before, our project didnt use SSL mode and it work perfectly. But now, when we want to use ssl mode, it didnt work as we expected.. for example, when I try to type https://localhost/ it display : Fatal error: Cannot instantiate non-existent class: smarty in /var/www/html/HOME/www/index.php on line 6 but it work perfectly without ssl mode (no warning at all). and here is part of our HTTP configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/html/home/www ServerName home.com.au ErrorLog logs/home-error_log CustomLog logs/home_log common DirectoryIndex home index.php index.html AliasMatch .*/Images/(.*) /var/www/html/home/www/Images/$1 Alias /images /var/www/html/home/www/Images/ Alias /Images /var/www/html/home/www/Images/ Alias /files /var/www/html/home/www/files/ Alias /plain /var/www/html/home/www/plain.php/ Alias /print /var/www/html/home/www/print.php/ Alias /Admin/_submit /var/www/html/home/www/Admin/_submit/ Alias /Admin /var/www/html/home/www/Admin/go.php/ Alias /Member/Correspondence/_submit /var/www/html/home/www/Member/Correspondence/_submit/ Alias /_submit /var/www/html/home/www/_submit/ Alias / /var/www/html/home/www/home.php/ Directory / AllowOverride All Options Indexes /Directory /VirtualHost -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] detecting type of field from $_POST ?
Hi .. i just wonder, is there any way to detecting the type of field (like textarea, button, radio, etc) from $_REQUEST / $_POST ? I need to detect that all .. because I want to put a script that will remove html tag (with htmlspecialchars() function) ... and the problem happen when I use input that produce array (like multiple checkbox will produce an array in $_POST). Is there any way to do this ? thank you -- Best regards, adwinwijaya mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] april mop in phpinfo()
Hello php-general, Happy april mop ... look at your phpinfo() :) whose picture is it ? -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] date() before 1 Jan 1970...
Hello php-general, how to display date like Monday, 1 January 1903 18:11 pm in php ? (since the date() function only able to display date before 1970) (and why it only support date after 1 Jan 1970) ? thanks -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] my checkbox array striped ?
Hi all, I have a script like this: in html form name=form action=process.php method=post input name=type[] type=checkbox id=type[] value=1 checked input name=type[] type=checkbox id=type[] value=2 input name=type[] type=checkbox id=type[] value=3 input name=type[] type=checkbox id=type[] value=4 input name=type[] type=checkbox id=type[] value=5 input type=text name=xyz input type=submit name=Submit value=GO /form and in process.php I have: ?php function stripTags($value){ if(isset($value)) return strip_tags($value); } if(isset($_POST)){ foreach($_POST as $key=$value){ $_POST[$key] = trim($value); $_POST[$key] = stripTags($value) ; } } print pre ; print_r($_POST); print /pre ; ? and the output will be : Array ( [type] = Array [xyz] = [Submit] = GO ) as you can see the type should be an array ... but it just displaying Array if I remove strip_tags from my script it will work perfectly (it will display the checkbox array) ... can someone explain to me why this happen ? I just want to strip tags every input the user entered ... thanks -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] where is my uploaded file ?
Hello Mike, Tuesday, February 24, 2004, 11:05:17 PM, you wrote: FML On 24 February 2004 06:58, adwinwijaya wrote: input name=image type=file $uploadfile = $uploaddir . $_FILES['userfile']['name']; Array ( [image] = Array FML Hint: image!=userfile FML Cheers! Ok, I have change 'userfile' to 'image' and now it show the warning like this: Warning: move_uploaded_file(C:\Program Files\Apache Group\Apache2\htdocs\test\): failed to open stream: Permission denied in C:\Program Files\Apache Group\Apache2\htdocs\Services\List_Notices\Death_and_Funeral\death_notice_process.php on line 15 Warning: move_uploaded_file(): Unable to move 'C:\WINDOWS\Temp\php251.tmp' to 'C:\Program Files\Apache Group\Apache2\htdocs\test\' in C:\Program Files\Apache Group\Apache2\htdocs\Services\upload_process.php on line 15 Possible file upload attack! Here's some debugging info: Array ( [image] = Array ( [name] = hpfr3320.log [type] = text/plain [tmp_name] = C:\WINDOWS\Temp\php251.tmp [error] = 0 [size] = 748 ) ) I also change the upload path in php.ini to C:\WINDOWS\Temp\ var_dump($_FILES) produce: array(1) { [image]= array(5) { [name]= string(12) hpfr3320.log [type]= string(10) text/plain [tmp_name]= string(26) C:\WINDOWS\Temp\php251.tmp [error]= int(0) [size]= int(748) } } can someone tell me what the happen ? here I attach the complete code : ?php $uploaddir = 'C:\\Program Files\\Apache Group\\Apache2\\htdocs\\test\\' ; // $uploaddir = 'C:/Program Files/Apache //Group/Apache2/htdocs/test/' ; -- this doesnt work as well $uploadfile = $uploaddir . $_FILES['userfile']['name']; print pre ; var_dump($_FILES) ; print pre ; print pre; if (move_uploaded_file($_FILES['image']['tmp_name'], $uploadfile)) { print File is valid, and was successfully uploaded. ; print Here's some more debugging info:\n; print_r($_FILES); } else { print Possible file upload attack! Here's some debugging info:\n; print_r($_FILES); } print /pre ; ? -- Best regards, adwinwijaya -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[3]: [PHP] where is my uploaded file ? (solved)
a $uploadfile = $uploaddir . $_FILES['userfile']['name']; the problem is solved now ... I am very careless ... i forgot to rename userfile to image ... thank you for your help :) -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] where is my uploaded file ?
Hello php-general, Right now I am trying to create a form that upload the file. The form it self: form name=forms2 action=upload.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=64000 input name=image type=file input type=submit name=submit /form and the upload.php itself contain the code that I took from chapter 18 of php manual: ?php $uploaddir = 'C:/Program Files/Apache Group/Apache2/htdocs/test/' ; $uploadfile = $uploaddir . $_FILES['userfile']['name']; print pre; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { print File is valid, and was successfully uploaded. ; print Here's some more debugging info:\n; print_r($_FILES); } else { print Possible file upload attack! Here's some debugging info:\n; print_r($_FILES); } print /pre ; ? But, I always got: Possible file upload attack! Here's some debugging info: Array ( [image] = Array ( [name] = templates.txt [type] = text/plain [tmp_name] = C:\WINDOWS\TEMP\php471.tmp [error] = 0 [size] = 2048 ) ) and when I look up at C:/Program Files/Apache Group/Apache2/htdocs/test/ (the target directory) .. I never found the file that I uploaded ... can someone tell me y this happen ? thank you -- Best regards, adwinwijaya mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
Hello ajay, Sunday, February 22, 2004, 7:57:21 PM, you wrote: a hi! a i have a class called DB that i include in a page as include(classes/DB.php); a however when i run this page i get an error saying a Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to open a stream: No such file or directory in a /home/bikkar/public_html/ajay/index.php a on line 18 a Warning: main(): Failed opening a '/home/bikkar/public_html/ajay/classes/DB.php' a for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') a in /home/bikkar/public_html/ajay/index.php on line 18 a but i have verified that DB.php is there, is a full(non-corrupted) and there are a a few other classes in that folder that upload fine. a can someone please help a thanks a -- a ajay a --- -- would you like to show us part of the code (especially on -- index.php line 18) -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] help please
Hello ajay, Sunday, February 22, 2004, 9:05:52 PM, you wrote: a hi! a the code is a ?php a include(classes/DB.php); a include(classes/PageMaker.php); hmm... may be you need to add '/' in front of classess try this one: include(dirname(__FILE__)./classes/DB.php); hope it will work :) good luck -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: tow dimenshional arrays
Hello Manuel, Sunday, February 22, 2004, 5:47:02 AM, you wrote: MVA As far as I know, there is no such a function. Maybe you should use a MVA different approach. MVA Manu. MVA Joe-At [EMAIL PROTECTED] wrote in message MVA news:[EMAIL PROTECTED] Hallo, 1) I want to work with the rows und columns of a tow dimensional array[i][j]. With array[i] I get the i'th row. But how can I get the j'th column? 2) Is there any command to transpose a two dimensional array? Thanks for help 1. $array_j = $array[$i] ; count($array_j) ; 2. foreach($array as $sub_array){ foreach($subarray as $key=$value) echo $key.'=='.$value ; } cmiiw -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] redirecting
Hello Ian, Wednesday, February 18, 2004, 5:42:34 PM, you wrote: IF Stick something like this in your html head/head: IF meta HTTP-EQUIV=REFRESH CONTENT=5; URL=blah.php IF Location won't work because you've already sent output to the browser. IF Ian IF On Wed, 2004-02-18 at 07:19, ajay wrote: hi! after having trawled through many google articles, i've been told that the best way to redirect a person is using header(Location:url); the problem is, i have form that is posted to another php script. This script then processes the form and then writes up a html page and includes in that page any warnings etc. i want the user to have say 5s to read that page and then be redirected to another page. so i have something like //process form //write page sleep(10); header(Location:blah.php); the problem is i get an error when the script gets to the header part, the error being Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\usydbasketball\subscribe_mailing_list.php:6) in c:\program files\apache group\apache\htdocs\usydbasketball\subscribe_mailing_list.php on line 67 so how do i workaround that? thanks regards -- ajay -- the best way to solve your problem is by using output buffering. try to start with ob_start(); and at the end of your script call with ob_end_flush() ; hope it will work :) -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] weird header() (bug may be)
Hello Chris, Thursday, February 12, 2004, 5:57:55 PM, you wrote: CS Nope. As others have pointed out, your Location header is improperly CS formed. CS However, your immediate problem is that, regardless of whether $foo == CS 'something', you *always* set the Location header to to_previous_page.php. CS So, even if you set it to to_another_page.php previously, you're CS overwriting it. CS Hope that helps. CS Chris CS = CS Chris Shiflett - http://shiflett.org/ CS PHP Security - O'Reilly CS Coming mid-2004 CS HTTP Developer's Handbook - Sams CS http://httphandbook.org/ CS PHP Community Site CS http://phpcommunity.org/ -- ok guys ... thanks for your answer and my another question -- why the php didnt stop processing after sending the header ? -- because in my logic ... after sending the (redirect) to another -- page .. the process shall be stopped and thanks for your -- advise ... I just know that I have to write location: with space -- ... I am get used to do that for almost 1 year :) -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Re: weird header() (bug may be)
Hello Eric, Thursday, February 12, 2004, 10:57:57 PM, you wrote: EB That's pretty wierd EB Think i'll do some research on headers, need more info anyway ;) EB But did my tip work in your script when you took a space there? EB Just wondering... EB Eric No it still doesnt work ... I have to put die() or exit() after calling the header(); and whether I put space and not using space .. the result still same .. ( I am get used not to use space for almost 1 year .. and suddenly I just know that I should put space :) ) In my logic, after we call header('location: foo.php'); the php processor should terminated and open the page foo.php instead ... cmmiw -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to a member function on a non-object
Hello Angelo, Thursday, February 12, 2004, 11:33:39 PM, you wrote: AZ HI, AZ I used my scripts yesterday and suddenly today they dont work and I get this AZ error: Call to a member function on a non-object AZ it points to erroneous line that calls a function in 1 of my classes. The AZ class and this particular file have not been changed since i used them yest. AZ I also checked my DB and all is perfect. I read somewhere on the net that it AZ could have something to do with cache. But i couldnt find any helpful info. AZ perhaps someone has experienced this error before and what could cause it AZ and how do i fix it? AZ thanx in advance AZ Angelo -- may be you have to check whether you have already include the file -- or not .. sometimes, include_once (or require_once) could lead to -- this error .. so try to use include or require .. hope it work :) -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] weird header() (bug may be)
Hello php-generaler's , I have a script like this : if($foo == 'something'){ header('Location:to_another_page.php') ; }else { do another thing in here } header('Location:to_previous_page.php'); I got a problem ... when $foo == 'something' .. it wont redirect me to to_another_page.php but if I put die(); after calling header(); .. it will work ... is this the bug ? I use php 4.3.4 ... and Apache 2.x thanks -- Best regards, adwinwijaya mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] julian date
Hello php-general, I wonder is there any class/function in php to convert from dates (dd/mm/ hh:mm:ss) to Julian date ? (I also wonder why there is no Julian date function in php function libraries ... i think it is nice to have Julian date ) thx -- Best regards, adwinwijaya mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php