[PHP] updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Mon, Mar 26, 2012 at 9:16 PM, Stuart Dallas wrote: > Rene: please read a book / website / something on PHP security. Some > things are important whether you believe they are or not. > > Yea, I will do that within a week or so.. I can also confirm that I'm not using any source of source control at the moment. I have used visual source control of Microsoft in the past, but that was on a windows-only environment. I now have several domains on a shared unix hoster that I have to update with files from a windows 7 system. Basically, I have on the windows dev server X:\data1\www\htdocs\code (the copy I work on), which have to be updated to X:\data1\www\htdocs\sites\[domainname]\code, preferably as quickly as possible, and then, once release worthy, to the accounts on the shared unix hoster. On the shared unix hoster (godaddy.com 4G hosting), I have 1 FTP account which points to a "primary domain" (abc.com), which has a filesystem underneath it also with the /sites/[domainname], and the non-primary domains there point to these /sites/[domainname]/ for their $_SERVER['DOCUMENT_ROOT']. I do not have seperate FTP accounts for each domain on the unix hoster. If someone could explain to me which (free) source control system to use and perhaps how, or even point me in the direction of a good tutorial on that subject, you'd make me very happy. I also think it's time I got at least a bit more professional. Yet, I'm looking for the simplest and most efficient solution. I've done a search for "rsync windows", and I get some rsync apps allright, but it's not clear to me yet how I would use these windows rsync clones to get done what I want.
[PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 12:08 PM, rene7705 wrote: > On Mon, Mar 26, 2012 at 9:16 PM, Stuart Dallas wrote: > >> Rene: please read a book / website / something on PHP security. Some >> things are important whether you believe they are or not. >> >> Yea, I will do that within a week or so.. > > I can also confirm that I'm not using any source of source control at the > moment. > I have used visual source control of Microsoft in the past, but that was > on a windows-only environment. > > I now have several domains on a shared unix hoster that I have to update > with files from a windows 7 system. > Basically, I have on the windows dev server X:\data1\www\htdocs\code (the > copy I work on), which have to be updated to > X:\data1\www\htdocs\sites\[domainname]\code, preferably as quickly as > possible, and then, once release worthy, to the accounts on the shared unix > hoster. > On the shared unix hoster (godaddy.com 4G hosting), I have 1 FTP account > which points to a "primary domain" (abc.com), which has a filesystem > underneath it also with the /sites/[domainname], and the non-primary > domains there point to these /sites/[domainname]/ for their > $_SERVER['DOCUMENT_ROOT']. I do not have seperate FTP accounts for each > domain on the unix hoster. > > If someone could explain to me which (free) source control system to use > and perhaps how, or even point me in the direction of a good tutorial on > that subject, you'd make me very happy. I also think it's time I got at > least a bit more professional. > Yet, I'm looking for the simplest and most efficient solution. > > I've done a search for "rsync windows", and I get some rsync apps > allright, but it's not clear to me yet how I would use these windows rsync > clones to get done what I want. > oh, one more thing; I just found that I won't always be working on the windows dev server's ...\htdocs\code, sometimes i'll find myself working on the /code copy in one of the /sites/[domainname]/code on the windows 7 dev system. how would I use a modern source control system to distribute the code from one of the subdomains to all other locations?
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
rene7705 hat am 27. März 2012 um 12:16 geschrieben: > On Tue, Mar 27, 2012 at 12:08 PM, rene7705 wrote: > > I've done a search for "rsync windows", and I get some rsync apps > > allright, but it's not clear to me yet how I would use these windows rsync > > clones to get done what I want. > > > > oh, one more thing; I just found that I won't always be working on the > windows dev server's ...\htdocs\code, sometimes i'll find myself working on > the /code copy in one of the /sites/[domainname]/code on the windows 7 dev > system. how would I use a modern source control system to distribute the > code from one of the subdomains to all other locations? Well, I guess google on rsync man page or read the documentation of these tools OR write to a mailing list that focusses on the use of linux tools. Then go and read about cron jobs or git/svn/putyoutoolhere post-receive/post-commit hooks or anything like that. Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 12:22 PM, ma...@behnke.biz wrote: > > > rene7705 hat am 27. März 2012 um 12:16 geschrieben: > > > On Tue, Mar 27, 2012 at 12:08 PM, rene7705 wrote: > > > I've done a search for "rsync windows", and I get some rsync apps > > > allright, but it's not clear to me yet how I would use these windows > rsync > > > clones to get done what I want. > > > > > > > oh, one more thing; I just found that I won't always be working on the > > windows dev server's ...\htdocs\code, sometimes i'll find myself working > on > > the /code copy in one of the /sites/[domainname]/code on the windows 7 > dev > > system. how would I use a modern source control system to distribute the > > code from one of the subdomains to all other locations? > > Well, I guess google on rsync man page or read the documentation of these > tools OR write to a mailing list that focusses on the use of linux tools. > Then go and read about cron jobs or git/svn/putyoutoolhere > post-receive/post-commit hooks or anything like that. > > > Ok, I'll be reading everything I can find on rsync today, but I don't think I wanna use auto-updates from cron, instead I want to hit an icon on my desktop to start the update, either on only the windows system, or from the windows system to all the unix domain directories..
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 12:31 PM, rene7705 wrote: > On Tue, Mar 27, 2012 at 12:22 PM, ma...@behnke.biz wrote: > >> >> >> rene7705 hat am 27. März 2012 um 12:16 geschrieben: >> >> > On Tue, Mar 27, 2012 at 12:08 PM, rene7705 wrote: >> > > I've done a search for "rsync windows", and I get some rsync apps >> > > allright, but it's not clear to me yet how I would use these windows >> rsync >> > > clones to get done what I want. >> > > >> > >> > oh, one more thing; I just found that I won't always be working on the >> > windows dev server's ...\htdocs\code, sometimes i'll find myself working >> on >> > the /code copy in one of the /sites/[domainname]/code on the windows 7 >> dev >> > system. how would I use a modern source control system to distribute the >> > code from one of the subdomains to all other locations? >> >> Well, I guess google on rsync man page or read the documentation of these >> tools OR write to a mailing list that focusses on the use of linux tools. >> Then go and read about cron jobs or git/svn/putyoutoolhere >> post-receive/post-commit hooks or anything like that. >> >> >> Ok, I'll be reading everything I can find on rsync today, but I don't > think I wanna use auto-updates from cron, instead I want to hit an icon on > my desktop to start the update, either on only the windows system, or from > the windows system to all the unix domain directories.. Are you sure you want to develop on a windows machine, and then push it out on all of your linux systems? That sounds dangerous to me. It's much safer to try it on a machine with same configuration as the production systems first. - Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 12:45 PM, Matijn Woudt wrote: > On Tue, Mar 27, 2012 at 12:31 PM, rene7705 wrote: > > On Tue, Mar 27, 2012 at 12:22 PM, ma...@behnke.biz > wrote: > > > >> > >> > >> rene7705 hat am 27. März 2012 um 12:16 > geschrieben: > >> > >> > On Tue, Mar 27, 2012 at 12:08 PM, rene7705 > wrote: > >> > > I've done a search for "rsync windows", and I get some rsync apps > >> > > allright, but it's not clear to me yet how I would use these windows > >> rsync > >> > > clones to get done what I want. > >> > > > >> > > >> > oh, one more thing; I just found that I won't always be working on the > >> > windows dev server's ...\htdocs\code, sometimes i'll find myself > working > >> on > >> > the /code copy in one of the /sites/[domainname]/code on the windows 7 > >> dev > >> > system. how would I use a modern source control system to distribute > the > >> > code from one of the subdomains to all other locations? > >> > >> Well, I guess google on rsync man page or read the documentation of > these > >> tools OR write to a mailing list that focusses on the use of linux > tools. > >> Then go and read about cron jobs or git/svn/putyoutoolhere > >> post-receive/post-commit hooks or anything like that. > >> > >> > >> Ok, I'll be reading everything I can find on rsync today, but I don't > > think I wanna use auto-updates from cron, instead I want to hit an icon > on > > my desktop to start the update, either on only the windows system, or > from > > the windows system to all the unix domain directories.. > > Are you sure you want to develop on a windows machine, and then push > it out on all of your linux systems? That sounds dangerous to me. It's > much safer to try it on a machine with same configuration as the > production systems first. > > Yea, i'm quite sure I want to develop on Windows 7. Ubuntu still has quircks when it comes to using 3 monitors on a single system, as far as I know. I just like windows 7 a lot better at the moment. And how would it be dangerous to do so?
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 12:47 PM, rene7705 wrote: > > > On Tue, Mar 27, 2012 at 12:45 PM, Matijn Woudt wrote: >> >> On Tue, Mar 27, 2012 at 12:31 PM, rene7705 wrote: >> > On Tue, Mar 27, 2012 at 12:22 PM, ma...@behnke.biz >> > wrote: >> > >> >> >> >> >> >> rene7705 hat am 27. März 2012 um 12:16 >> >> geschrieben: >> >> >> >> > On Tue, Mar 27, 2012 at 12:08 PM, rene7705 >> >> > wrote: >> >> > > I've done a search for "rsync windows", and I get some rsync apps >> >> > > allright, but it's not clear to me yet how I would use these >> >> > > windows >> >> rsync >> >> > > clones to get done what I want. >> >> > > >> >> > >> >> > oh, one more thing; I just found that I won't always be working on >> >> > the >> >> > windows dev server's ...\htdocs\code, sometimes i'll find myself >> >> > working >> >> on >> >> > the /code copy in one of the /sites/[domainname]/code on the windows >> >> > 7 >> >> dev >> >> > system. how would I use a modern source control system to distribute >> >> > the >> >> > code from one of the subdomains to all other locations? >> >> >> >> Well, I guess google on rsync man page or read the documentation of >> >> these >> >> tools OR write to a mailing list that focusses on the use of linux >> >> tools. >> >> Then go and read about cron jobs or git/svn/putyoutoolhere >> >> post-receive/post-commit hooks or anything like that. >> >> >> >> >> >> Ok, I'll be reading everything I can find on rsync today, but I don't >> > think I wanna use auto-updates from cron, instead I want to hit an icon >> > on >> > my desktop to start the update, either on only the windows system, or >> > from >> > the windows system to all the unix domain directories.. >> >> Are you sure you want to develop on a windows machine, and then push >> it out on all of your linux systems? That sounds dangerous to me. It's >> much safer to try it on a machine with same configuration as the >> production systems first. >> > Yea, i'm quite sure I want to develop on Windows 7. Ubuntu still has quircks > when it comes to using 3 monitors on a single system, as far as I know. I > just like windows 7 a lot better at the moment. > And how would it be dangerous to do so? > > Code that you write on a windows box might work different/not work at all on a linux machine. Think of different filesystem, different Apache/PHP versions, etc. I have to develop on windows too sometimes, and what I usually do in such cases is first push the code to a subdomain test.mydomain.com. If that works correctly, I push it over to www.mydomain.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 1:02 PM, Matijn Woudt wrote: > On Tue, Mar 27, 2012 at 12:47 PM, rene7705 wrote: > > > > > > On Tue, Mar 27, 2012 at 12:45 PM, Matijn Woudt > wrote: > >> > >> On Tue, Mar 27, 2012 at 12:31 PM, rene7705 wrote: > >> > On Tue, Mar 27, 2012 at 12:22 PM, ma...@behnke.biz > >> > wrote: > >> > > >> >> > >> >> > >> >> rene7705 hat am 27. März 2012 um 12:16 > >> >> geschrieben: > >> >> > >> >> > On Tue, Mar 27, 2012 at 12:08 PM, rene7705 > >> >> > wrote: > >> >> > > I've done a search for "rsync windows", and I get some rsync apps > >> >> > > allright, but it's not clear to me yet how I would use these > >> >> > > windows > >> >> rsync > >> >> > > clones to get done what I want. > >> >> > > > >> >> > > >> >> > oh, one more thing; I just found that I won't always be working on > >> >> > the > >> >> > windows dev server's ...\htdocs\code, sometimes i'll find myself > >> >> > working > >> >> on > >> >> > the /code copy in one of the /sites/[domainname]/code on the > windows > >> >> > 7 > >> >> dev > >> >> > system. how would I use a modern source control system to > distribute > >> >> > the > >> >> > code from one of the subdomains to all other locations? > >> >> > >> >> Well, I guess google on rsync man page or read the documentation of > >> >> these > >> >> tools OR write to a mailing list that focusses on the use of linux > >> >> tools. > >> >> Then go and read about cron jobs or git/svn/putyoutoolhere > >> >> post-receive/post-commit hooks or anything like that. > >> >> > >> >> > >> >> Ok, I'll be reading everything I can find on rsync today, but I don't > >> > think I wanna use auto-updates from cron, instead I want to hit an > icon > >> > on > >> > my desktop to start the update, either on only the windows system, or > >> > from > >> > the windows system to all the unix domain directories.. > >> > >> Are you sure you want to develop on a windows machine, and then push > >> it out on all of your linux systems? That sounds dangerous to me. It's > >> much safer to try it on a machine with same configuration as the > >> production systems first. > >> > > Yea, i'm quite sure I want to develop on Windows 7. Ubuntu still has > quircks > > when it comes to using 3 monitors on a single system, as far as I know. I > > just like windows 7 a lot better at the moment. > > And how would it be dangerous to do so? > > > > > > Code that you write on a windows box might work different/not work at > all on a linux machine. Think of different filesystem, different > Apache/PHP versions, etc. I have to develop on windows too sometimes, > and what I usually do in such cases is first push the code to a > subdomain test.mydomain.com. If that works correctly, I push it over > to www.mydomain.com. > So far the code that I've written and am using works OK on both windows and unix. But I've just booted up my ubuntu installation and am currently upgrading from 11.04 to 11.10, maybe that fixes the issues I was having with it, and if it does I'll seriously consider using ubuntu as my primary dev environment again..
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
hey, I just read the rsync man page for the first time, and while it sure looks simple enough for my taste, wouldn't updating multiple remote domains be like a whole series of the same FTP updates to these different domain directories there? In other words, take a long time because of my 200kb/s link to the unix hoster?
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
On Tue, Mar 27, 2012 at 1:21 PM, Peter Ford wrote: > On 27/03/12 12:13, rene7705 wrote: > >> hey, I just read the rsync man page for the first time, and while it sure >> looks simple enough for my taste, wouldn't updating multiple remote >> domains >> be like a whole series of the same FTP updates to these different domain >> directories there? In other words, take a long time because of my 200kb/s >> link to the unix hoster? >> >> > The first time might be slow, but you can then do incremental updates > which would be a lot quicker. > > ok, that'll do nicely..
Re: [PHP] Re: updating code asap to multiple domains, windows to unix, with source control software (was: Re: [PHP] including PHP code from another server..)
rene7705 wrote: > On Tue, Mar 27, 2012 at 1:21 PM, Peter Ford wrote: > >> On 27/03/12 12:13, rene7705 wrote: >> >>> hey, I just read the rsync man page for the first time, and while it >>> sure >>> looks simple enough for my taste, wouldn't updating multiple remote >>> domains >>> be like a whole series of the same FTP updates to these different >>> domain >>> directories there? In other words, take a long time because of my >>> 200kb/s >>> link to the unix hoster? >>> >>> >> The first time might be slow, but you can then do incremental updates >> which would be a lot quicker. >> >> ok, that'll do nicely.. Depending upon whether or not you have shell access to the hosts, you could update a host and then use rsync from that host to the rest. >
[PHP] Uploading and creating an email attachment, WITHOUT a DB on server
Dear all, I am rather green to PHP and web programming in general, and would just like some pointers how to accomplish the following. I have a webpage on a remote host, which supports PHP but does not have a DB installed. Here, I have a form where the user can input personal credentials, which are then processed and sent as an email message to me from the server. This part work so far. I want to do the following: the user should be able to upload his/her CV. To do so, I need the following: 1) A way for the user to open a conventional file system view to select the file to upload 2) A way to take this file, add it as an attachment to the mail created in the form, and finally send the mail + attachment to my mail. Is this possible to do without intermediary storage in a DB? I.e. is it possible just to pass the attachment directly from working memory to the function for sending email? Or does it have to go intermediare storage? Thanks in advance for any help! -- Best, Christopher Svanefalk
[PHP] Re: Uploading and creating an email attachment, WITHOUT a DB on server
Addendum: what standard functions could I invoke to accomplish the file system view part? On Tue, Mar 27, 2012 at 2:37 PM, Christopher Svanefalk < christopher.svanef...@gmail.com> wrote: > Dear all, > > I am rather green to PHP and web programming in general, and would just > like some pointers how to accomplish the following. > > I have a webpage on a remote host, which supports PHP but does not have a > DB installed. Here, I have a form where the user can input personal > credentials, which are then processed and sent as an email message to me > from the server. This part work so far. > > I want to do the following: the user should be able to upload his/her CV. > To do so, I need the following: > 1) A way for the user to open a conventional file system view to select > the file to upload > 2) A way to take this file, add it as an attachment to the mail created in > the form, and finally send the mail + attachment to my mail. > > Is this possible to do without intermediary storage in a DB? I.e. is it > possible just to pass the attachment directly from working memory to the > function for sending email? Or does it have to go intermediare storage? > > Thanks in advance for any help! > > -- > Best, > > Christopher Svanefalk > > -- Best, Christopher Svanefalk
Re: [PHP] Thinking out loud - a continuation...
[snip]On 3/27/2012 12:21 AM, Robert Cummings wrote: I think you need two things... the recursive post processor that removes the string indexes for the children. And then a function that creates a JavaScript array expression from an object or array. The question I have for you... is given the following array structure that might be generated from my previous code: array ( 'name' => 'exec-001', 'children' => array ( 'sub-exec-011' => array ( 'name' => 'sub-exec-011', 'children' => array ( 'sub-sub-exec-111' => array ( 'name' => 'sub-sub-exec-111', 'children' => array() ), 'sub-sub-exec-112' => array ( 'name' => 'sub-sub-exec-112', 'children' => array() ) ) ), 'sub-exec-012' => array ( 'name' => 'sub-exec-012', 'children' => array ( 'sub-sub-exec-121' => array ( 'name' => 'sub-sub-exec-121', 'children' => array() ), 'sub-sub-exec-122' => array ( 'name' => 'sub-sub-exec-122', 'children' => array() ) ) ) ) ), 'exec-002' => array ( 'name' => 'exec-002', 'children' => array ( 'sub-exec-021' => array ( 'name' => 'sub-exec-021', 'children' => array ( 'sub-sub-exec-211' => array ( 'name' => 'sub-sub-exec-211', 'children' => array() ), 'sub-sub-exec-212' => array ( 'name' => 'sub-sub-exec-212', 'children' => array() ) ) ), 'sub-exec-022' => array ( 'name' => 'sub-exec-022', 'children' => array ( 'sub-sub-exec-221' => array ( 'name' => 'sub-sub-exec-221', 'children' => array() ), 'sub-sub-exec-222' => array ( 'name' => 'sub-sub-exec-222', 'children' => array() ) ) ) ) ) ); ?> On first blush, I think you want the following structure (from your recent posts): array ( 'name' => 'exec-001', 'children' => array ( 0 => array ( 'name' => 'sub-exec-011', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-111', 'children' => array() ), 1 => array ( 'name' => 'sub-sub-exec-112', 'children' => array() ) ) ), 1 => array ( 'name' => 'sub-exec-012', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-121', 'children' => array() ), 1 => array ( 'name' => 'sub-sub-exec-122', 'children' => array() ) ) ) ) ), 1 => array ( 'name' => 'exec-002', 'children' => array ( 0 => array ( 'name' => 'sub-exec-021', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-211', 'children' => array() ), 1 => array ( 'name' => 'sub-sub-exec-212', 'children' => array() ) ) ), 1 => array ( 'name' => 'sub-exec-022', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-221', 'children' => array() ),
Re: [PHP] Re: Uploading and creating an email attachment, WITHOUT a DB on server
On Tue, Mar 27, 2012 at 8:41 AM, Christopher Svanefalk wrote: > Addendum: what standard functions could I invoke to accomplish the file > system view part? > > On Tue, Mar 27, 2012 at 2:37 PM, Christopher Svanefalk < > christopher.svanef...@gmail.com> wrote: > >> Dear all, >> >> I am rather green to PHP and web programming in general, and would just >> like some pointers how to accomplish the following. >> >> I have a webpage on a remote host, which supports PHP but does not have a >> DB installed. Here, I have a form where the user can input personal >> credentials, which are then processed and sent as an email message to me >> from the server. This part work so far. >> >> I want to do the following: the user should be able to upload his/her CV. >> To do so, I need the following: >> 1) A way for the user to open a conventional file system view to select >> the file to upload >> 2) A way to take this file, add it as an attachment to the mail created in >> the form, and finally send the mail + attachment to my mail. >> >> Is this possible to do without intermediary storage in a DB? I.e. is it >> possible just to pass the attachment directly from working memory to the >> function for sending email? Or does it have to go intermediare storage? >> >> Thanks in advance for any help! >> >> -- >> Best, >> >> Christopher Svanefalk >> >> > > > -- > Best, > > Christopher Svanefalk Yo don't need a db for this, but you will need to place the CV onto the file system so you can attach it to the email. Its not a hard process if you use something like phpmailer. Show user form with upload field process the form on the server (incl file upload) check the file extension to ensure you're not sending something bad create the email attach the file send log that you received the file and send the email unlink the file -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Uploading and creating an email attachment, WITHOUT aDB on server
On 27-03-2012 15:16, Bastien Koert wrote: On Tue, Mar 27, 2012 at 8:41 AM, Christopher Svanefalk wrote: Addendum: what standard functions could I invoke to accomplish the file system view part? On Tue, Mar 27, 2012 at 2:37 PM, Christopher Svanefalk< christopher.svanef...@gmail.com> wrote: Dear all, I am rather green to PHP and web programming in general, and would just like some pointers how to accomplish the following. I have a webpage on a remote host, which supports PHP but does not have a DB installed. Here, I have a form where the user can input personal credentials, which are then processed and sent as an email message to me from the server. This part work so far. I want to do the following: the user should be able to upload his/her CV. To do so, I need the following: 1) A way for the user to open a conventional file system view to select the file to upload 2) A way to take this file, add it as an attachment to the mail created in the form, and finally send the mail + attachment to my mail. Is this possible to do without intermediary storage in a DB? I.e. is it possible just to pass the attachment directly from working memory to the function for sending email? Or does it have to go intermediare storage? Thanks in advance for any help! -- Best, Christopher Svanefalk -- Best, Christopher Svanefalk Yo don't need a db for this, but you will need to place the CV onto the file system so you can attach it to the email. Its not a hard process if you use something like phpmailer. Show user form with upload field process the form on the server (incl file upload) check the file extension to ensure you're not sending something bad create the email attach the file send log that you received the file and send the email unlink the file No you don't, you can write the message, and upload a file in the same form, then just combine em into an email message on the posted-to page. there are a ton of notes on the php.net/mail page which can help you with that. Alternatively you can also use a set of prewritten functions, such as the phpmailer package mentioned above (though I personally prefer to use my own). Also note: checking file extensions has nothing to do with security; relying on such a crude technique to work is a very very bad idea. It also limits the possible formats that people would like to send their CV as; for example I can imagine people would want to use extensions such as .doc, .docx, but also .pdf. If you only allow those, you'll make life hard on people wanting to post a .txt or .rtf! As for the whole "tree view"-thing, if you include a simple type="file"> HTML-tag, the browser will add the viewer automatically; to be more precise, you don't even have the option of doing anything like that with PHP (since it's not client-side but serverside only), HTML or JavaScript (which is strictly forbidden to do this by its standards). If you really really want to customize that part, you'd need to use Flash or some kind of other browser-plugin. But it's easiest (and most reliable) to just rely on the HTML input type=file tag. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Thinking out loud - a continuation...
[snip]On 3/27/2012 12:21 AM, Robert Cummings wrote: I think you need two things... the recursive post processor that removes the string indexes for the children. And then a function that creates a JavaScript array expression from an object or array. The question I have for you... is given the following array structure that might be generated from my previous code: array ( 'name' => 'exec-001', 'children' => array ( 'sub-exec-011' => array ( 'name' => 'sub-exec-011', 'children' => array ( 'sub-sub-exec-111' => array ( 'name' => 'sub-sub-exec-111', 'children' => array() ), 'sub-sub-exec-112' => array ( 'name' => 'sub-sub-exec-112', 'children' => array() ) ) ), 'sub-exec-012' => array ( 'name' => 'sub-exec-012', 'children' => array ( 'sub-sub-exec-121' => array ( 'name' => 'sub-sub-exec-121', 'children' => array() ), 'sub-sub-exec-122' => array ( 'name' => 'sub-sub-exec-122', 'children' => array() ) ) ) ) ), 'exec-002' => array ( 'name' => 'exec-002', 'children' => array ( 'sub-exec-021' => array ( 'name' => 'sub-exec-021', 'children' => array ( 'sub-sub-exec-211' => array ( 'name' => 'sub-sub-exec-211', 'children' => array() ), 'sub-sub-exec-212' => array ( 'name' => 'sub-sub-exec-212', 'children' => array() ) ) ), 'sub-exec-022' => array ( 'name' => 'sub-exec-022', 'children' => array ( 'sub-sub-exec-221' => array ( 'name' => 'sub-sub-exec-221', 'children' => array() ), 'sub-sub-exec-222' => array ( 'name' => 'sub-sub-exec-222', 'children' => array() ) ) ) ) ) ); ?> On first blush, I think you want the following structure (from your recent posts): array ( 'name' => 'exec-001', 'children' => array ( 0 => array ( 'name' => 'sub-exec-011', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-111', 'children' => array() ), 1 => array ( 'name' => 'sub-sub-exec-112', 'children' => array() ) ) ), 1 => array ( 'name' => 'sub-exec-012', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-121', 'children' => array() ), 1 => array ( 'name' => 'sub-sub-exec-122', 'children' => array() ) ) ) ) ), 1 => array ( 'name' => 'exec-002', 'children' => array ( 0 => array ( 'name' => 'sub-exec-021', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-211', 'children' => array() ), 1 => array ( 'name' => 'sub-sub-exec-212', 'children' => array() ) ) ), 1 => array ( 'name' => 'sub-exec-022', 'children' => array ( 0 => array ( 'name' => 'sub-sub-exec-221', 'children' => array() ),
[PHP] Re: List working?
On 03/27/2012 04:23 PM, Jay Blanchard wrote: > Seems unusual not to have any traffic on it all day long. i put in my codes but i only get blank page... -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: List working?
On Tue, Mar 27, 2012 at 11:32 PM, Shawn McKenzie wrote: > On 03/27/2012 04:23 PM, Jay Blanchard wrote: >> Seems unusual not to have any traffic on it all day long. > > i put in my codes but i only get blank page... > List seems to be working fine, last message was at 3:11 PM GMT. That's about 6 hours ago which doesn't seem unusual.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: List working?
On 03/27/2012 04:34 PM, Matijn Woudt wrote: > On Tue, Mar 27, 2012 at 11:32 PM, Shawn McKenzie wrote: >> On 03/27/2012 04:23 PM, Jay Blanchard wrote: >>> Seems unusual not to have any traffic on it all day long. >> >> i put in my codes but i only get blank page... >> > > List seems to be working fine, last message was at 3:11 PM GMT. That's > about 6 hours ago which doesn't seem unusual.. is not working fine, i put in my php codes and need help with blank screen -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: List working?
It working fine here, just people are busy I suppose. On Wed, Mar 28, 2012 at 10:45 AM, Shawn McKenzie wrote: > On 03/27/2012 04:34 PM, Matijn Woudt wrote: >> On Tue, Mar 27, 2012 at 11:32 PM, Shawn McKenzie >> wrote: >>> On 03/27/2012 04:23 PM, Jay Blanchard wrote: Seems unusual not to have any traffic on it all day long. >>> >>> i put in my codes but i only get blank page... >>> >> >> List seems to be working fine, last message was at 3:11 PM GMT. That's >> about 6 hours ago which doesn't seem unusual.. > > is not working fine, i put in my php codes and need help with blank screen > > -- > Thanks! > -Shawn > http://www.spidean.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: List working?
On 03/27/2012 08:11 PM, Daniel Fenn wrote: > It working fine here, just people are busy I suppose. > y u no help me !! i have white page withg my php codes in my page ! help please !! asap please i put codes in my file and is white > > On Wed, Mar 28, 2012 at 10:45 AM, Shawn McKenzie wrote: >> On 03/27/2012 04:34 PM, Matijn Woudt wrote: >>> On Tue, Mar 27, 2012 at 11:32 PM, Shawn McKenzie >>> wrote: On 03/27/2012 04:23 PM, Jay Blanchard wrote: > Seems unusual not to have any traffic on it all day long. i put in my codes but i only get blank page... >>> >>> List seems to be working fine, last message was at 3:11 PM GMT. That's >>> about 6 hours ago which doesn't seem unusual.. >> >> is not working fine, i put in my php codes and need help with blank screen >> >> -- >> Thanks! >> -Shawn >> http://www.spidean.com >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List working?
[snip] > y u no help me !! i have white page withg my php codes in my page ! > help please !! asap please i put codes in my file and is white > [/snip] You put code in your e-mail? Or code in your web page? If it is your web page you need to start a new thread and post the code that you used so that we can help trouble-shoot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] APC or any other cache for php 5.4.0?
Hello all, Just wondering, is there anyone on this mailing who is running php 5.4.0 and is running some sort of cache such as APC or xcache? I would love to be able to upgrade but I want to be sure that some cache would work before making the move. Thankyou:) Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php