Astahost.com   Mar 21, 2010
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > PHP
Pages: 1, 2

How To Edit Php Files?

free web hosting

Read Latest Entries..: (Post #18) by iGuest on Jan 4 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.Com/Write-PHP-Scripts -reply by Cassandra...
read more.
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

How To Edit Php Files?

lorenza pietersen
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.

Comment/Reply (w/o sign-up)

Mark420
Hi Welcome to Asta wink.gif

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 wink.gif and have to keep scrolling up again to see what name u called the argument,,something i tend to do a lot!

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 wink.gif

 

 

 


Comment/Reply (w/o sign-up)

Quatrux
You just need to have php installed on your system and use the php.exe, but that won't satisfy you. As most users, you can install a server of your own, you just need to get apache+php and maybe also you can install mysql, so on windows it would be called a WAMP (Windows Apache MySQL PHP) Server on Linux LAMP, the same just Linux.. For windows there are different software which installs everything for you. I also suggest to install Zend optimizer the latest stable version. Google is full of tutorials how to do it, step by step tutorials are available.. Even this forum has something, because I remember reading about it here, so you can use the forum search.

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. wink.gif

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.

Comment/Reply (w/o sign-up)

Mark420
Lol @ Quatrox..yes Ive got fast fingers wink.gif

Mad thing is..I made a post today explaining a user about Xampp this morning!


Comment/Reply (w/o sign-up)

HellFire121
You can do this in frontpage but other programs can do it better. If you right click on the file you can open it in the actual editor that frontpage has. Since i no longer use frontpage i don't know exactly how to do it.

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

Comment/Reply (w/o sign-up)

vujsa
Even funnier is that the topic was originally in the database forum!@#%!$#@! huh.gif

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

Comment/Reply (w/o sign-up)

bakr_2k5
I did a quick google search and came with this!

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 wink.gif

bakr_2k5

Comment/Reply (w/o sign-up)

lorenza pietersen
Thank you all.
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.

Comment/Reply (w/o sign-up)

pyost
QUOTE(lorenza pietersen @ Sep 25 2006, 06:25 PM) *

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.

Comment/Reply (w/o sign-up)

minnieadkins
I've heard of a utility called PHP design. I honestly don't know what it is. But yes there's no GUI to help generate your code as some sort of WYSIWIG. If you think about it, it makes sense. In php you have to use logic, where as you just "mark-up" your html to show what you want.

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.

Comment/Reply (w/o sign-up)

Latest Entries

iGuest

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.Com/Write-PHP-Scripts

-reply by Cassandra

Comment/Reply (w/o sign-up)

iGuest
Edit PHP in NotePad now webpage not working
How To Edit Php Files?

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


Comment/Reply (w/o sign-up)

DrK3055A
I like crimpson editor, It colours the php instructions, separate php sintax from html code, and it does advanced search/replace features that i appreciate a lot for many uses, not just php coding.


Comment/Reply (w/o sign-up)

Houdini
To view and debug php files using an editor you will have to have PHP installed on your computer and since databases are usually used with PHP to make a more dynamic web site and since PHP and MySQL developers worked together to improve their products (which are both free) and you would also need a webserver like Apache , which is also free. A really great editor is PHP Designer 2006 or the newest version is PHP Designer 2007 you can get it HERE

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.

Comment/Reply (w/o sign-up)

ajit bohra
Use EditPlus 2 it is great editior for editing php, css, ,html and many more.

here is official homepage : editplus

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : edit, php, files

  1. Magic Quotes And $_files
    (3)
  2. How To Create/edit/delete Ftp Accounts With Php
    Help me to create one php page to create FTP user accounts in Unix Ser (2)
    Thanks /cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> ....
  3. How To Protect Included Files
    (10)
    Hey! How can i make my included files 100% safe. Like if I include a file witht his code.. CODE
    include "bla.php"; How can i make it 100% safe? I know I must close the php tags in the
    included files. but what more =?....
  4. Reading Files And Folders
    (1)
    I am in the process of writing a small content management system for my niche sites and need to be
    able to accomplish the following two items. Any assistance would be appreciated: I have a
    directory that has nothing but sub directories in it and I need to be able to identify each
    directory name and return them in an option drop down selection menu which will be included in an
    identifying URL. ALSO: I am in need of a script that could be included on a returned page
    that will read the content of a table and identify various keywords within the content and pl....
  5. Php File Upload
    About uploading files through php (3)
    Right i have done a check for a tutorial on this as well as a question about it but php is not
    allowed in the search box. So i thought i'd just ask what i want to know. I have a form which
    uploads a file, it refreshes the page, uploads the file and then alerts the user to if the file has
    uploaded. To be honest im not sure why i keep getting the error. But here is the code: This is the
    form that is used for the user to select the file &fid= " method="POST"> Choose a file to
    upload: This is the upload code if ($op == "up"....
  6. Help To Transfer Files Within Hosting Space Using Php
    (4)
    I want to transfer files from one folder to another or an entire folder in my web space. I don't
    want to download it and upload it, can I do this using a PHP script. Please help me. I'm just
    learning the basics of PHP....
  7. How To Delete Files When Session Ends
    (4)
    Dear Friends I need solution to a problem. The problem is as under: I am creating certain files
    (playlist) in server disk when user selects some songs. The files are created in ram format. What I
    want to do is to delete these files created during a particular session. Is it possible to do so?
    Now I am deleting these files using on Unload event fired by JavaScript. I am using PHP. ....
  8. Deleting Files With PHP
    is this possible? (6)
    It is posible for PHP to delete files on a server? If so, how is this possible? Just out of
    interest.......
  9. Php : Variables Included Dont Work In Functions
    Variables from Included files dont work (4)
    Today, I came up with this strange PHP behaviour. Just wanted to know if anyone has any
    suggestions! I make a common variable/function file called config.php. I put in my generally used
    functions in it. Suppose this is my file CODE // -----VARIABLES --- // $a=10,$b.... //
    -----FUCTIONS--- // function doit() { print "A value is " . $a; } ?> Here, suppose we execute
    this file directly. Since A has a global scope, it does work perfectly. But if this same file is
    imported in another file say, mainfile.php CODE // -----VARIABLES --- // $c,$d.... include &#....
  10. Online HTML/PHP Editor: Edit File In Browser!
    (12)
    Im wondering how you can load a file into a text area and edit it. Lets say i have a php file called
    test.php and id like this file to be loaded into a textarea and the user should be able to edit this
    file and store it. Is this posible? Im also wondering how you make it so the html dosnt get
    encoded by the browser, lets say i need to explain on my website how you use html. CODE Just
    testing something, maybe i can get this from the source. ....
  11. How Do I Create And Write To Files?
    creating, writing, deleting files (4)
    Hi, Can someone please tell me how to create files and write to them in PHP. I just want to create
    a simple file containing text, and then be able to read it or update it. Thanks Alfie....
  12. Getting Files From Other Sites
    Using wget (3)
    Hello. A while ago, a friend showed me this PHP code (wget) which allows you to get files from other
    sites. I was a simple one liner type thing. Since my old host (Nytka) went down, I've lost it,
    as has my friend. Do you know anything about wget, and could tell me it?....

    1. Looking for edit, php, files



See Also,

*SIMILAR VIDEOS*
Searching Video's for edit, php, files
advertisement




How To Edit Php Files?

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com



Creative Commons License