I need to prohibit filenames with everything but English characters and numbers but regexp and string function don't seem to work because they consider the Greek alphabet letters as part of the A-Z a-z sequence. Here's what I've tried:
Quote:if (strspn($str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") != strlen($str))
{
echo 'invalid filename';
}
Quote:if (!preg_match("/^([-a-z0-9])+$/i", $str))
{
echo 'invalid filename';
}
get font info from a font file
hello,Does anyone know how to get font info from a font file ... using php of course ! The stuff I need to extract is Font Family, Author, Copyright etc which is contained as attributes in the font
opening a window with after form submission
I know this this forum has nothing to do with JS, but i'm trying to use it with my php script. What i'm trying to do, and i'm not 100& sure i'm doing right, is after someone has submitted the
Need Help with a query
Hello, For some reason I am just not getting the right answer when I do this query and not quite sure why? $runinposition = mysql_query("SELECT * FROM bb_off WHERE user='$user' AND test1='test1'
How to find OS bit version
How can I tell the person browsing my site is running 32, or 64 bit operating system?
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and works fine EXCEPT I want to add the strip slashes bit to it so it will save what I type in. However,
Combining refCursors and Summing
Given the following DDL:
Problems with returning true or false in eval()'d code
Hi guys,Would appreciate some help with a problem when running eval() on a function that should return true or false. From php.net:Quoteeval() returns NULL unless return is called in the evaluated
New Login Script
Hi all, i attempted to create a whole new login script witch isnt working for some reason i dont know why. When i put the users details and then press submit, it just refreshes the page, even when i
Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages. So, lets say a new file is created, and my class is used in that file. We will call that file test.php
Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no idea how... Each entry is laid out like this: ("$status||$id||$shop||$name||$date")I