eduard Posted February 10, 2011 Share Posted February 10, 2011 For security I paste the .php files on a USB stick!- Can I open them on my own computer without using MAMP e. g. http://localhost (Apache)? How?- How do I open them on another pc? Link to comment Share on other sites More sharing options...
iwato Posted February 10, 2011 Share Posted February 10, 2011 For security I paste the .php files on a USB stick!- Can I open them on my own computer without using MAMP e. g. http://localhost (Apache)? How?- How do I open them on another pc?You can treat files with the .php extension in the same way that you treat any text file. If you want to take advantage of the PHP code that is within your files, however, the files must be accessible from within your web application. In your case, this will likely be a folder in your MAMP application called htdocs; this is where you should store your PHP files, if you wish to implement the PHP code within them.Roddy Link to comment Share on other sites More sharing options...
eduard Posted February 10, 2011 Author Share Posted February 10, 2011 You can treat files with the .php extension in the same way that you treat any text file. If you want to take advantage of the PHP code that is within your files, however, the files must be accessible from within your web application. In your case, this will likely be a folder in your MAMP application called htdocs; this is where you should store your PHP files, if you wish to implement the PHP code within them.RoddyNo, I want to open my.php files without using MAMP, but by my local host (Apache)! on my own computer How? andHow about opening .php files on a pc? Link to comment Share on other sites More sharing options...
thescientist Posted February 10, 2011 Share Posted February 10, 2011 No, I want to open my.php files without using MAMP, but by my local host (Apache)! on my own computer How? andHow about opening .php files on a pc?It's just like he said. You can open the file and edit it in a text editor on any platform. It's just a text file, not an OS specific file or anything.You can only run/execute the file from a webserver, like (MAMP which is running Apache), which was the whole point of installing MAMP in the first place. Link to comment Share on other sites More sharing options...
eduard Posted February 10, 2011 Author Share Posted February 10, 2011 It's just like he said. You can open the file and edit it in a text editor on any platform. It's just a text file, not an OS specific file or anything.You can only run/execute the file from a webserver, like (MAMP which is running Apache), which was the whole point of installing MAMP in the first place.Thanks! But Apache (local host) was installed on my MacBook! Therefore I can run .php files without using MAMP? But how? Link to comment Share on other sites More sharing options...
boen_robot Posted February 10, 2011 Share Posted February 10, 2011 Apache is part of MAMP.Apache/MAMP was installed on your MacBook. Therefore, your MacBook is now able to run PHP files by using Apache/MAMP.If you want to run the PHP files on another computer, or if you reinstall your computer and want to run the files on it again, install Apache and PHP on that computer. Whether you do it "all in one" like with MAMP, or separately is irrelevant.Technically... there's a way to run PHP on the "command line", but if you don't even know what "command line" is, forget about it. Don't do it. Don't ask us how to do it. It's not trivial (it would require you to read between one and a whole dozen of separate tutorials, depending on your computer experience in general). Link to comment Share on other sites More sharing options...
iwato Posted February 10, 2011 Share Posted February 10, 2011 But Apache (local host) was installed on my MacBook! Therefore I can run .php files without using MAMP? But how?Being the novice that you are, and understanding that MAMP was designed to make your life easier, why do you want to know?Roddy Link to comment Share on other sites More sharing options...
eduard Posted February 10, 2011 Author Share Posted February 10, 2011 Apache is part of MAMP.Apache/MAMP was installed on your MacBook. Therefore, your MacBook is now able to run PHP files by using Apache/MAMP.If you want to run the PHP files on another computer, or if you reinstall your computer and want to run the files on it again, install Apache and PHP on that computer. Whether you do it "all in one" like with MAMP, or separately is irrelevant.Technically... there's a way to run PHP on the "command line", but if you don't even know what "command line" is, forget about it. Don't do it. Don't ask us how to do it. It's not trivial (it would require you to read between one and a whole dozen of separate tutorials, depending on your computer experience in general).Ok, thanks! Link to comment Share on other sites More sharing options...
thescientist Posted February 10, 2011 Share Posted February 10, 2011 Thanks! But Apache (local host) was installed on my MacBook! Therefore I can run .php files without using MAMP? But how?You have to learn how to use the application that came with your MacBook to do the same things that you were doing with MAMP. Link to comment Share on other sites More sharing options...
eduard Posted February 10, 2011 Author Share Posted February 10, 2011 You have to learn how to use the application that came with your MacBook to do the same things that you were doing with MAMP.But it is possible? Link to comment Share on other sites More sharing options...
eduard Posted February 10, 2011 Author Share Posted February 10, 2011 Being the novice that you are, and understanding that MAMP was designed to make your life easier, why do you want to know?RoddyIf I can open them without MAMP, it is easy to open .php files saved on a USB stick (security) Link to comment Share on other sites More sharing options...
boen_robot Posted February 10, 2011 Share Posted February 10, 2011 Open. Yes.Run. No.(You still need to make this disctinction. It's vital that you do.) Link to comment Share on other sites More sharing options...
eduard Posted February 10, 2011 Author Share Posted February 10, 2011 Open. Yes.Run. No.(You still need to make this disctinction. It's vital that you do.)Ok, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.