php-general Digest 30 Dec 2006 18:56:34 -0000 Issue 4542

Topics (messages 246291 through 246293):

Re: help with \n\r in strings
        246291 by: Manolet Gmail

Re: Chocked
        246292 by: Casey Chu

php/ajax question
        246293 by: tedd

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
2006/12/29, Arpad Ray <[EMAIL PROTECTED]>:
Angelo Zanetti wrote:
> So is there a way to test for \r\n? or what else can I use to delimit
> these two values (last column of row and first column of next row)?
>


mmm what about open the file with and hex editor?.. or mmm notepad++
have a option to see if is \r \n or \r\n

hopes helps

Since it's coming from a file, you might as well just read it with
file(), which will split each line into an array automatically. If it's
a CSV file, then fgetcsv() helps you out even more.

Arpad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
He probably meant "shocked" and "shocking".

On 12/29/06, Jim Lucas <[EMAIL PROTECTED]> wrote:
Peter Lauri wrote:
> I was chocked when I got my additional dedicated server from my server
> provider. I assumed everyting would have been the same as I ordered the
> server with same package name etc. The chocking part was that the server had
> PHP5 and not PHP4.
>
>
>
> Ok, it is not a hard piece of work to get it working, but one thing stunned
> me :-)
>
>
>
> Assuming that I have the following structure:
>
>
>
> /index.php
>
> /classes/first.class.php
>
> /classes/second.class.php
>
>
>
> Index.php:
>
>
>
> include_once("classes/first.class.php");
>
>
>
>
>
> first.class.php
>
>
>
> include_once("second.class.php");
>
>
>
>
>
> This worked fine, but this time I get an "open dir" error. Is this something
> that is new to PHP5 for this, or do I just need to config the server to
> accept this "sloppy" including of files?
>
>
>
> Best regards,
>
> Peter Lauri
>
>
>
>  <http://www.dwsasia.com/> www.dwsasia.com - company web site
>
>  <http://www.lauri.se/> www.lauri.se - personal web site
>
>  <http://www.carbonfree.org.uk/> www.carbonfree.org.uk - become Carbon Free
>
>
>
>
>
More the likely it is a difference in the include_path setting which can
be found in the php.ini file.  This can also override this setting in
the VirtualHosts block and .htaccess file.  Check these locations for
any additional include_path changes in the old system.
sometimes you will see things like

include_path = '/path/to/htdocs:.:/var/www/html'

or other variations of this

Jim Lucas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Hi gang:

I have a small php script that behaves differently depending upon who's calling it. The code is:

<?php session_start();   /* a.php  */
ob_start();
$_SESSION['var'] = "test";
ob_clean();
header("Location: http://www.example.com/b.php";); /* Redirect browser */
exit;                    ?>

If the code is called directly, namely http://www.example.com/a.php, then the $_SESSION var is filled with "text" and the redirect is realized.

However, if the php script is called via ajax:

-snip- preceding ajax

function sndReq(action)
{
http.open('get', 'a.php');
http.send(null);
}

Then the $_SESSION var is filled with "test", but the redirect is not realized.

Why can't the php script redirect the browser when called via ajax ?

Thanks.

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---

Reply via email to