| |
|
Welcome to AstaHost - Dear Guest | |
Toggle shoutbox
Shoutbox
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
How To Edit Php Files?
#2
Posted 25 September 2006 - 12:51 PM
Ok first of all I would suggest this as the best program for editing any kind of text file like a php file
Notepad ++
Its pretty amazing at what it can do...
It understand languages like Php Html Sql etc so when you make a new file or open a file it wil understand the syntax and the arguments and change the colour of them to make it al much easier to see..
example of how it does this...this is a bit of php code im looking at right now wth notepad ++
/* Load and run the appropriate controller */
$results = array();
see what its done? the /* comments are in green statements are coming out in blue..
It makes it much easier in spotting mistakes in your code also..
It puts line numbers down the side so if you get errors from php like "error returned at line 9" you can jump right to it and change the code..
Also it splits you code into blocks using pagebreaks so u can collapse and expand sections..this is handy if you set a whole load of arguments at the start of the code and forget them
Check out the Language menu item at the top and you can change to lots of different programming languages and then it will detect parts of the code it understands and colour them out for you making it easier to see as i showed earlier.
Its also available in a huge list of real world languages..even Basque! and Farsi
Its Open license too!!
So you got nothing to loose!!
Good Luck with it
#3
Posted 25 September 2006 - 12:52 PM
Some PHP Editors (IDE) has debuggers and you just need to show the path to php.exe and it will output everything in an ie or some other browser engine.. but you won't have full features of php.
Oh! Mark420 you were faster, but as I read your post you just suggested a php editor, I think he wanted to preview his php files without uploading them to an online php server through ftp or some other protocol.
Edited by Quatrux, 25 September 2006 - 12:56 PM.
#5
Posted 25 September 2006 - 01:16 PM
I recommend you use a different editor. Ones that i have tried are textpad, crimson editor and dreamweaver. Textpad and crimson editor are both free and do a good job. Crimson editor also has special features that will help you with editing.
You can get textpad from: www.textpad.com
And crimson editor from: www.crimsoneditor.com
You need to pay for dreamweaver but it is a fantastic program and you should get it.
-HellFire
#6
Posted 25 September 2006 - 01:16 PM
I move dit here and think that the user wanted to both to edit the files offline and preview the ouput generated.
So I would recommend installing apache, MySQL, and PHP on your local system and use any text editor like Notepad, Notepad++, PHP Designer, CuteHTML.
Keep in mind that PHP is a server side scripting language and will require you to learn basic programming skills whereas HTML is only a markup language which only modifies the text and images on a webpage. If you are using FrontPage, then you may not even fully understand the way HTML works which is a requirement if you want to design a website using PHP.
The reason you need to know both HTML and PHP is because the PHP you write will simply generate HTML on the fly for you and that HTML is what the user's browser will see. Only you and your server wil see the PHP coding.
vujsa
#7
Posted 25 September 2006 - 04:01 PM
Dev-PHP:
http://devphp.sourceforge.net/
It has it's builtin webserver for previewing php en stuff like that..
Don't use it myself since it's software for windows,
but a friend of mine used to use this.
So check it out
bakr_2k5
Edited by bakr_2k5, 25 September 2006 - 04:02 PM.
#8
Posted 25 September 2006 - 04:25 PM
So I have to learn the php programming skills first, before I can modify any php files? I thought that there must be an editor like frontpage for php (you cannot open php in frontpage, because it open automatically in notepad) where you can just copy/paste images etc.
#9
Posted 26 September 2006 - 09:42 AM
So I have to learn the php programming skills first, before I can modify any php files?
Exactly. There are numerous differences between (X)HTML and PHP because of which there's isn't anything like FrontPage for PHP. As already stated, PHP is a server side scripting language - that means that it will only run on a server supporting PHP. Why? Because it uses resources provided by the server. It is more dependant that HTML.
Here's a simple example. In HTML, you must define exactly what you want to be shown, and that's why there is a possibility of using WYSIWYG (what you see is what you get) editors. A single PHP file, however, can output different things in different moments. If it contains a part there generates the current date, the output will change every day, but without changing the code. That isn't possible with HTML.
In order to completely understand this, you really would have to learn at least some basic PHP, as it is a standard nowadays.
#10
Posted 27 September 2006 - 12:44 AM
I use notepad++ as well but I've had a few problems out of blank space and indentions. Overall however you can't beat the price.
PHP is parsed by the server so you can't just run it locally on your machine without something to parse it with. First a first time user I suggest installing a bundled webserver, php, and mysql package such as the one's mentioned here.
#11
Posted 28 September 2006 - 01:04 PM
Hi,
You can use frontpage to preview HTML files, but how can I edit and preview PHP files offline. I'm not well-known with PHP and I see more and more using this script to manage their site.
hi,
i'm sure there are lost of editors for php files, this is only a suggestion:
http://www.editpadpro.com/editphp.html
it's not free, but you can download a free evaluation copy, just to check it out
good luck!
#12
Posted 29 September 2006 - 02:56 PM
Don't wanna read previous posts and your question might be already answered... anyway;)
I prefer the NullStudio phpEd. Don't remember the link to download, but I think you may easily find a lot of.
Also a good one is PHP Expert Editor(developer - Ankor). The linkage situation is same as with previos one.
All these are most for editting. (1st one can proceed some scripts, but more dificult are not to be runned).
Advanced scripts can be runned using Server emulation applications such as Apache, Sokkit, ColdFusion etc...
Again, I'm givin' no links...You may assume that I'm lazy to go for searching all these on the Internet...
And you'll be completely right=]
OK, my opinion&advice is here... Good luck in your searches)
Edited by CrazyPensil, 29 September 2006 - 06:14 PM.
#13
Posted 29 September 2006 - 09:11 PM
#14
Posted 30 September 2006 - 03:16 AM
That's when I found PHP Designer. It's great! If you install PHP on your computer, you can point PHP Designer to it and you can test your scripts from the program as long as they don't pass parameters though the URL or contain SQL, then a local installation of MySQL and Apache will work fine for debugging. The debugging feature is nice! One cool feature is that when you do more advanced stuff, you'll have code in brackets (e.g. { and }) and when you have multiple ones, it gets confusing. PHP Designer will actually highlight the set of brackets you're working in! Can't beat that!
[N]F
#16
Posted 18 October 2006 - 12:59 AM
If you really want to save yourself a lot of trouble with installing a webserver like Apache a dbms like MySQL PHP on your own on your local machine to wrtie and test your PHP and MySQL database then do your self a favor and get XAMPP HERE or if you have a Mac you would of course want to have MAMP which you can get right it at this LINK HERE!XAMPP not only installs Apache MySQL and PHP but also Perl and phpMyAdmin and Mercury Mail server and FileZilla FTP server. It is as simple as download the file and then run the install accepting the defaults. Within ten minutes of download you will have a working webserver MySQL database and the latest version of PHP plus the ability to use a software switch to use either PHP 4 or PHP 5 ever since I found XAMPP in 2003 I have been using and upgrading it when more important upgrades became available. Take this from some one who had in the past manually installed Apache PHP and MySQL...it is not worth the headaches of setting all that up when you can just download XAMPP then install it and boom you are done with it, it is truly childs play to install all that you get with XAMPP. TRY it out today.
#18
Guest_(G)Megan _*
Posted 07 December 2009 - 08:15 PM
I am fairly new to all this, so here is what happened. After receiving an email from a customer informing me of a type-o on one of my pages (Zen Cart) I went into my FTP server, /shop/includes/languages/english/, to be exact and editing the file in notepad. I saved it, transfered onto the server, and updated the template. Now the page doesn't work. I can post the php code if need be, but I have tried just about everything I can think of, being new to this.Please HELPPP!
-question by Megan
#19
Guest_(G)Cassandra_*
Posted 04 January 2010 - 07:50 PM
I hope I`m doing this right - this is my first time here. I`m also looking to write php codes and preview them on my computer before uploading them. Write them, not have a program try and do them for me; and I found this site that seems helpful for starting out http://www.Wikihow.C...ite-PHP-Scripts
-reply by CassandraReply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











