nusphere PHPEd
| From: | Gilberto Garcia Jr. | Date: | Mon, 19 May 2003 15:19:28 +0000 |
| Subject: | nusphere PHPEd | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148174@lists.php.net to get a copy of this message | ||
Does anyone here uses phped from nusphere?
I had it installed on my debian woody (linux), but I have a problem with
portuguese language. I cannot type accents like á, â or ã.
Can someone help me, please?
----- Original Message -----
From: "Marek Kilimajer" <kilimajer@webglobe.sk>
To: "Grusell" <johan@grusell.com>
Cc: <php-general@lists.php.net>
Sent: Monday, May 19, 2003 12:15 PM
Subject: Re: [PHP] Problems opening file + str_replace
> Are you trying file uploads or read a file from the client's computer?
> For the former read
> http://www.php.net/manual/en/features.file-upload.php, the
> later won't
work.
>
> Grusell wrote:
>
> >Hi!
> >
> >Let me describe my problem:
> >I have this form where I browse for files (powerpoints) on my computer. I
> >select a file, click the open-button and I go to another page that is
> >supposed to open my powerpoint-file (in_pp2.php).
> >
> >The thing is that I need to str_replace some parts of the filename.
> >It usually comes out lookin like this
> >file///D://my_powerpoint.ppt
> >
> >but needs to be D:/my_powerpoint.ppt, in order for me to open it.
> >
> >Therefore I have a str_replace that should take care of the problem, but
> >it still won't work for some reason.
> >I have tested the str_replace function when I manually set $path =
> >file:///D://my_powerpoint.php, and then it does the correct replacing.
But
> >why won't it replace the characters when I'm sending the path through
this
> >form
> >
> >Any ideas, help would be greatly appreciated, since this problem has been
> >bugging me for two days now.
> >Thanks!
> >
> >
> >in_pp.php
> ><?
> >require("dbmanager.php");
> >?>
> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> ><html>
> ><head>
> ><title>Browse powerpoint</title>
> ><meta http-equiv="Content-Type" content="text/html;
> >charset=iso-8859-1">
> ><link href="style2.css" rel="STYLESHEET"
> >type="text/css">
> ></head>
> >
> ><body>
> ><form name="sendFile" method="post" action="in_pp2.php"
> >enctype="multipart/form-data">
> ><input type="hidden" name="path"/>
> ><input type="hidden" name="isubmit" value="Open"/>
> ><input type="file" size="15" name="file"
> >class="button"/>
> ><input type="button" value="Open" class="button"
> >OnClick="this.form.path.value = this.form.file.value;
this.form.submit()">
> ></form>
> ></body>
> ></html>
> >
> >
> >
> >in_pp2.php
> ><?php
> >$path= $_POST["path"];
> >$path = str_replace("file:///","", $path);
> >$path = str_replace("://",":/", $path);
> >header("Location: $path");
> >exit;
> >?>
> >
> >
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>