Re: [PHP] Generating sequence of AlphaNumber
On Thu, 15 Nov 2007, Jeffery Fernandez wrote: > Hi all, > > I am having trouble generating a sequence of numbers from the following start > value: > AX0001 > > what I have done so far is loop through each character and check if its a > alphabet and separating the characters and digits. > > But when I increment the digits, its strips of the leading zeros. How can I > get a sequence of values like: > > AX0001 > AX0002 > AX0003 > AX0004 > . > AX0099 > AX0100 > > and so on ? > > jeffery > -- Probably the easiest way is sprintf(); for example, sprintf('%04.0d', 34) returns 0034 See http://www.php.net/sprintf ... . Steve Edberg [EMAIL PROTECTED] . . Computer Consultant University of California, Davis . . (530)754-9127 . ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general@lists.php.net
On Sat, 1 Dec 2007, Andrei Verovski (aka MacGuru) wrote: > Hi ! > > Anyone knows PHP/AJAX library which allows to get full path of file dropped > into web browser's window area? > > It is required for document archiving system in order to avoid multiple (or to > be more precise, almost endless) usage of "open file" dialogs from the > browser. > > Library should be compatible with Firefox (Lin, Win, Mac), IE and Safary. > > > Thanks in advance for any suggestion(s). > > Andrei > As others have noted, Javascript cannot return the full path to a client-side document for security reasons. If you need a multiple file upload interface, you might want to take a look at some extjs ALAX toolkit-based stuff, eg http://aariadne.com/uploadform/ http://extplorer.sourceforge.net/ Haven't used either of them, though. I do use extjs alot: http://extjs.com/ Normally I shy away from 'Web 2.0' kinda stuff, but I've had to develop some complex dynamic interfaces to a PHP/MySQL backend and had to make the leap. It's well-documented, the developers are active and helpful participants in the forums, and it seems to work pretty well cross-platform (haven't tried it on my Linux/Solaris boxes yet, but WinXP/Firefox, WinXP/IE, OSX/Firefox, OSX/Safari all seem to work pretty well. Had some quirks with OSX/Opera, but haven't had a chance to delve into that. I also use the HTML_AJAX package - http://pear.php.net/package/HTML_AJAX - as I still have some PHP4 left and can't use the native JSON functions. If extjs doesn't float your boat, you can always look into Scriptaculous, Dojo, YUI, many others. steve ... . Steve Edberg [EMAIL PROTECTED] . . Computer Consultant University of California, Davis . . (530)754-9127 . ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating thumbnails
On Tue, 17 Jul 2007, Vanessa Vega wrote: > Good day to all! > > I would like to ask for some help with creating automatically thumbnail > pictures using PHP.. > > thanks in advance! Well, that's a pretty vague question. The more specific you are, the better answers you'll get. That being said, I'm happy with phpThumb - http://phpthumb.sourceforge.net/ Also see http://www.php.net/manual/en/ref.image.php http://www.php.net/manual/en/ref.exif.php and http://www.catb.org/~esr/faqs/smart-questions.html - steve ... . Steve Edberg [EMAIL PROTECTED] . . Computer Consultant University of California, Davis . . (530)754-9127 . ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Data validation at the db level
On Thu, 7 Sep 2006, Chris W. Parker wrote: > Hey everyone, > > Is there any work being done in the database world for data validation > at the db level? > > It would be cool to just define a field as being an email address (of > length nn) instead of saying a TEXT field (of length nn) and validating > it in the application layer. Same goes for other things as well. > > Sure, it's not really possible to account for all different types of > data, but the basics would be nice. (email, numbers only, letters only, > alphanumeric only, [a-z0-9#-] only, etc.) > That would be what CHECK constraints are for; MySQL doesn't have them yet, Postgresql does: http://www.postgresql.org/docs/8.1/interactive/ddl-constraints.html#AEN1954 You could emulate them in MySQL5 using triggers and stored procedures. If your database allowed user-defined column types, you could maybe define one as 'email address' with the approriate restrictions. steve ... . Steve Edberg [EMAIL PROTECTED] . . Computer Consultant University of California, Davis . . (530)754-9127 . ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Open file on a Mounted Share on Mac OS X
Is PHP configured to allow access to /Volumes directory? Check doc_root, open_basedir in your php.ini: http://us3.php.net/manual/en/ini.php steve On Tue, 12 Sep 2006, Rahul S. Johari wrote: > > I did exactly that... Used Terminal to find the correct path. Did "pwd" in > terminal window where my file is located. And this is what I got: > /Volumes/foresight > > Which is what I have used in php to specify the path. But it still says file > doesn't exist. > > > On 9/12/06 6:05 PM, "Ray Hauge" <[EMAIL PROTECTED]> wrote: > > > Hmmm... That's odd. > > > > I would use your terminal program, then change directory to the location of > > the file, and do "pwd". That should give you your working directory. If > > you > > can get to it on OSX, and PHP is on OSX, then PHP should be able to see the > > file in the same path. > > Rahul S. Johari > Supervisor, Internet & Administration > Informed Marketing Services Inc. > 500 Federal Street, Suite 201 > Troy NY 12180 > > Tel: (518) 687-6700 x154 > Fax: (518) 687-6799 > Email: [EMAIL PROTECTED] > http://www.informed-sources.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ... . Steve Edberg [EMAIL PROTECTED] . . Computer Consultant University of California, Davis . . (530)754-9127 . ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function list
On Thu, 1 Feb 2001, Josh G wrote: > http://www.php.net/quickref.php is probably the best you'll get. no > descriptions, but it _is_ a list of all the functions. > > Gfunk - http://www.gfunk007.com/ > See: http://zugeschaut-und-mitgebaut.de/php/ -steve > - Original Message - > From: "Jerry Lake" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 01, 2001 10:45 AM > Subject: [PHP] function list > > > > Is there somewhere I can get a list > > of all the php functions and a brief > > description, instead of the full manual > > like a cheat sheet of sorts > > > > Jerry Lake ... . Steve Edberg [EMAIL PROTECTED] . . Computer Consultant University of California, Davis . . http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ . ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]