Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (21 April 2014 - 09:11 PM) Hey, Ritesh, Did You Hear Me?
@  yordan : (14 April 2014 - 05:28 PM) By The Way, This Could Be An Interesting Subject For A Topic, What About Posting This Question? Let's See If Other People Have The Same Feeling Concerning Bootlists!
@  yordan : (13 April 2014 - 09:36 AM) Boot Order : Cd, [Usb,] Hard Drive :D
@  yordan : (11 April 2014 - 07:23 PM) I Simply Let The Bios Do That
@  Ritesh : (11 April 2014 - 10:23 AM) Is It Possible To Launch Fedora Live Cd Or Installation Disk From Hard Drive On Windows Platform Using Grub Mbr File.
@  Ritesh : (11 April 2014 - 10:21 AM) No U Are Not.. Btw.. I Have Question For You.
@  yordan : (10 April 2014 - 08:02 AM) You Are Partially Right.
I Was Not.
Nevertheless, I Am Again :)
@  Ritesh : (09 April 2014 - 07:33 PM) :P
@  Ritesh : (09 April 2014 - 07:33 PM) I Think U R Not..
@  yordan : (09 April 2014 - 09:28 AM) I'm The Master Of The Shoutbox!
@  yordan : (05 April 2014 - 10:32 PM) He-He
@  Ritesh : (04 April 2014 - 06:59 PM) Ha Ha Ha ....
@  yordan : (04 April 2014 - 11:15 AM) Welcome Back, Starscream!
@  yordan : (03 April 2014 - 02:31 PM) And I Hope That He Will Come Back Soon :)
@  yordan : (01 April 2014 - 02:53 PM) Nice, Ritesh Came, I'm Not Home Alone Today.
@  Ritesh : (01 April 2014 - 08:51 AM) Oh!!! Poor Dear Yordan..
@  yordan : (31 March 2014 - 10:02 AM) I'm A Poor Lonesome Cow-Boy
@  yordan : (27 March 2014 - 02:22 PM) He Is Unpatient Due To His Patients!
@  Ritesh : (27 March 2014 - 10:46 AM) :(
@  Ritesh : (27 March 2014 - 10:46 AM) He Is Busy With His Patients.

Photo
- - - - -

How To Edit Php Files?


20 replies to this topic

#1 lorenza pietersen

lorenza pietersen

    Newbie [ Level 2 ]

  • Members
  • 13 posts

Posted 25 September 2006 - 12:29 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.

#2 Mark420

Mark420

    The Modernator

  • Members
  • 486 posts
  • Gender:Male
  • Location:The Interweb!

Posted 25 September 2006 - 12:51 PM

Hi Welcome to Asta :)

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 :) 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 :D

#3 Quatrux

Quatrux

    the Q

  • [HOSTED]
  • 1,669 posts
  • Gender:Male
  • Location:Lithuania, Vilnius
  • Interests:PHP, MySQL, Oracle, PL/SQL, HTML, CSS, Javascript, jQuery, C# Computers, Alternative OS, Amiga, MorphOS, Beer, Friends, Linux, KDE..
  • myCENTs:30.76

Posted 25 September 2006 - 12:52 PM

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. :)

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.


#4 Mark420

Mark420

    The Modernator

  • Members
  • 486 posts
  • Gender:Male
  • Location:The Interweb!

Posted 25 September 2006 - 12:59 PM

Lol @ Quatrox..yes Ive got fast fingers :)

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

#5 HellFire121

HellFire121

    Premium Member

  • [HOSTED]
  • 438 posts

Posted 25 September 2006 - 01:16 PM

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

#6 vujsa

vujsa

    Absolute Newbie

  • Members
  • 888 posts
  • Gender:Male
  • Location:Indianapolis, Indiana, USA (Midwest)
  • myCENTs:35.43

Posted 25 September 2006 - 01:16 PM

Even funnier is that the topic was originally in the database forum!@#%!$#@! :)

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 bakr_2k5

bakr_2k5

    Member - Active Contributor

  • Members
  • 83 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Computing, Gaming, Programming and Websurfing :)

Posted 25 September 2006 - 04:01 PM

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 :)

bakr_2k5

Edited by bakr_2k5, 25 September 2006 - 04:02 PM.


#8 lorenza pietersen

lorenza pietersen

    Newbie [ Level 2 ]

  • Members
  • 13 posts

Posted 25 September 2006 - 04:25 PM

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.

#9 pyost

pyost

    Way Out Of Control - You need a life :)

  • Members
  • 1,090 posts
  • Gender:Male
  • Location:Vancouver, British Columbia
  • myCENTs:67.69

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 minnieadkins

minnieadkins

    Premium Member

  • Members
  • 292 posts

Posted 27 September 2006 - 12:44 AM

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.

#11 anewgame

anewgame

    Newbie [ Level 2 ]

  • Members
  • 12 posts

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 :P

good luck!

#12 CrazyPensil

CrazyPensil

    Member [ Level 1 ]

  • Members
  • 42 posts
  • Location:Russia, St.Petersburg
  • Interests:I'm a guy from Russia, my interests are English, Programmin' and playin' games, of course:). Despite being young I could succeed in both English &amp; Programming(nearly FCE in Englis and HTML,JS,ASP,PHP,CSS,DOM,C,Perl,DHTML etc in programming). I'm studying in a prestige lycee fund by an international organisation called TOLERANCE and placed in Turkey. Since most of the bussinessmen of that firm ar Turkish people, our lycee has a lot of turkish teachers. and we're studying Turkish, too. I colud reach a lot in it, but gave it up a little time ago. It is used ro talk to teacher in English in my lycee and such lessons as Physics, Biology,Chemistry, Algebra,Geometry,Informatics etc are also performed in the same language(english). I'd like to get a friend in America or England or any other country, which is capable of programming and knows english. <br /><br />P.S. Have you aready visited Russia? ;)

Posted 29 September 2006 - 02:56 PM

Hello there!
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 nighthawk

nighthawk

    Newbie [ Level 2 ]

  • Members
  • 16 posts

Posted 29 September 2006 - 09:11 PM

I used dreamweaver and PhpDesigner for editing php, but then I've found notepad2. It recognizes sintax of many different languages (php, html, javascript, sql, c++ ...) works very, very fast and can work even without installing. If you install decide to install it then notepas2 will replace windows' original notepad.

#14 nightfox

nightfox

    NiGHTFoX - Hiding in the dark

  • Members
  • 680 posts

Posted 30 September 2006 - 03:16 AM

Actually, what I did when I was looking for a php editor, I just found a bunch and figured out which one had the features I needed, how stable, the license and such.

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!

:P

[N]F

#15 ajit bohra

ajit bohra

    Newbie [ Level 1 ]

  • Members
  • 6 posts

Posted 17 October 2006 - 04:52 PM

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

here is official homepage : editplus

#16 Houdini

Houdini

    Super Member

  • Members
  • 572 posts
  • Location:Nashville Tennessee

Posted 18 October 2006 - 12:59 AM

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.

#17 DrK3055A

DrK3055A

    Member [ Level 1 ]

  • Members
  • 46 posts

Posted 22 October 2006 - 02:48 AM

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.

#18 Guest_(G)Megan _*

Guest_(G)Megan _*
  • Guests

Posted 07 December 2009 - 08:15 PM

Edit PHP in NotePad now webpage not workingHow 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



#19 Guest_(G)Cassandra_*

Guest_(G)Cassandra_*
  • Guests

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 Cassandra

#20 Guest_(G)ajith_*

Guest_(G)ajith_*
  • Guests

Posted 05 August 2011 - 05:26 PM

php file questionHow To Edit Php Files?

My question is php multiple form submit to file then it read line by line and then it fetch retrive and edit option etc look like databasePlease explain with example

-reply by ajith





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users