Liquid Fire Posted November 6, 2006 Share Posted November 6, 2006 ok i am needing to knwo hwo to spilt up a string like:string1: "c:\images\image.giftostring1: "c:\images\"string2: "image.gif"and it is only going to be used for directroy string so i need to be able to get the path including all directories in one string and the file name in the other. how would I go about this? Link to comment https://forums.phpfreaks.com/topic/26378-spliting-a-string-into-2/ Share on other sites More sharing options...
brendandonhue Posted November 6, 2006 Share Posted November 6, 2006 basename() and dirname() Link to comment https://forums.phpfreaks.com/topic/26378-spliting-a-string-into-2/#findComment-120608 Share on other sites More sharing options...
xtentic Posted November 6, 2006 Share Posted November 6, 2006 And if you like to create a function on your own... here are some tipssubstrfornextread string from end to beginif found \ or / you've hit a directory, so all above is filename rest is path.:) Link to comment https://forums.phpfreaks.com/topic/26378-spliting-a-string-into-2/#findComment-120618 Share on other sites More sharing options...
Liquid Fire Posted November 6, 2006 Author Share Posted November 6, 2006 now the problem is nto with php but html forms. i have using the form type "file" but that only seems to send the file name, is there a way to have the person browser there own files liek the "file" form type does but send the directory and file name? Link to comment https://forums.phpfreaks.com/topic/26378-spliting-a-string-into-2/#findComment-120645 Share on other sites More sharing options...
brendandonhue Posted November 7, 2006 Share Posted November 7, 2006 No, information about the user's computer isn't sent like that (using HTML forms anyway, it might be possible in Java or something.) Link to comment https://forums.phpfreaks.com/topic/26378-spliting-a-string-into-2/#findComment-120751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.