On 22 Oct 2008 at 14:39, Thodoris wrote:
Hi guys,
I am developing a project and I wrote an interface to import contracts
in it. The problem is that when the user uploads the file I don't know
what is the encoding it has. So I decided that a good idea is to make
the user tell me the
A neat way to transcode between different encodings is htmlentities
and html_entity_decode [1, 2]
EXAMPLE:
?php
# encode a string in UTF-8 to html entities
$string = 'øæåöäü';
$string = htmlentities($string, ENT_QUOTES, 'UTF-8');
# transcode it into ISO-8859-15
$string =
On 22 Oct 2008 at 14:39, Thodoris wrote:
Hi guys,
I am developing a project and I wrote an interface to import contracts
in it. The problem is that when the user uploads the file I don't know
what is the encoding it has. So I decided that a good idea is to make
the user tell me the
Delta Storm wrote:
I'm a beginner and i'm still learning PHP and I got a problem:
$file = http://localhost/test_folder/test1.txt;; //I have
also tried test_folder/test1.txt and text1.txt
$fh = fopen($file, r) or die(Could not open file!);
$data = fread($fh,
# [EMAIL PROTECTED] / 2007-01-05 16:34:41 +:
Delta Storm wrote:
I'm a beginner and i'm still learning PHP and I got a problem:
$file = http://localhost/test_folder/test1.txt;; //I have
also tried test_folder/test1.txt and text1.txt
$fh = fopen($file, r) or
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-05 16:34:41 +:
Delta Storm wrote:
I'm a beginner and i'm still learning PHP and I got a problem:
$file = http://localhost/test_folder/test1.txt;; //I have
also tried test_folder/test1.txt and text1.txt
$fh
# [EMAIL PROTECTED] / 2007-01-05 17:17:46 +:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-05 16:34:41 +:
Delta Storm wrote:
I'm a beginner and i'm still learning PHP and I got a problem:
$file = http://localhost/test_folder/test1.txt;; //I have
also tried
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-05 17:17:46 +:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-05 16:34:41 +:
Delta Storm wrote:
I'm a beginner and i'm still learning PHP and I got a problem:
$file =
# [EMAIL PROTECTED] / 2007-01-05 17:40:49 +:
Using mod_php with Apache will make the current directory the directory
that contains the script being requested. I am assuming that the OP is
trying to access the file from the script that is being requested and
not an included file in a
Hi Roman,
This line is your problem.
$lines = preg_replace(/\n/, br, $lines);
You're replacing your newlines with br tags.
Your explode won't find anything because it's looking for \n 's.
Labunski wrote:
Hello,
The problem is, that script outputs Last line from the file (and not first
[snip]
Here is a script I'm using to upload files. Can anyone see anything
wrong
with it? No file is uploaded when I click the upload button
[/snip]
Start here http://us4.php.net/manual/en/features.file-upload.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Zambra - Michael wrote:
What kind of line ending does the file() function include in the array
elements. I'm having problem with file() combined with implode() when
reading in complete HTML files in a Windows environment. After parsing
these
resulting strings I get tons of white lines (??).
On Sunday 17 March 2002 12:53, Ben Waldher wrote:
I'm having some trouble writing data to a file, when I use this code it
works fine:
?php
$file = fopen(template.txt, w);
fwrite ($file, $temp);
fclose ($file);
?
But several problems with this occur:
?php
$stuff = include
?
for ($i=0 ; $i 4 ; $i++)
{
file://do something
for ($k=0 ; $k 3 ; $k++)
{
print "input type=\"checkbox\" name=\"checkans[$i][$k]\"
value=\"".$K."\" "; file://this is working
print "input type=\"file\" name=\"ans[$i][$k]\" "; file://this
is
not
}
}
On Fri, 19 Jan 2001, Richard Lynch wrote:
?
for ($i=0 ; $i 4 ; $i++)
{
file://do something
for ($k=0 ; $k 3 ; $k++)
{
print "input type=\"checkbox\" name=\"checkans[$i][$k]\"
value=\"".$K."\" "; file://this is working
print "input type=\"file\"
15 matches
Mail list logo