How Do You Find Lines In Php? - The Title says it all!! :P

Pages: 1, 2
free web hosting

Read Latest Entries..: (Post #11) by snlildude87 on Sep 28 2005, 03:27 AM. (Line Breaks Removed)
Glad we could solve your problem.Question answered -> thread closed.
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Others

How Do You Find Lines In Php? - The Title says it all!! :P

scab_dog
Hello Trap17 Members,

I would really like to know how to find lines in PHP, Like my forums. Like when it says Error on Line 345. How do you find the line. I sat there one day pressing the down arrow counting the line, but there should be a simpler way of doing i. Can anybody help.

Well I know what i said above dosent make sence, but it will do, it is hard to explain. tongue.gif

From,
.::DAMAN::.

Reply

snlildude87
Find the troubled file, copy its content to Notepad, go to View - Status Bar, then scroll down, click on a random line, look at the status bar, and it will tell you what line your cursor is on. Keep doing that until you get what you want.

I'm also moving this to another forum since it doesn't belong here.

Reply

shadowdemon
yes i have this program called edit plus 2.

wwat it does is u can copy the code and paste it and find each line. pm me the code and ill find the line for u if u want

Reply

Tyssen
Get yourself any decent text-based web editor - they all have line numbers.

Reply

dogomchawi
I would suggest that you either get Dreamweaver which costs a lot of money
or Textpad

Within Texpad there is an option for syntax highlighting and line numbers - so you can get your code all pretty looking AND get the line numbers too =)

Here is the link for Textpad: http://www.textpad.com/

Reply

rvalkass
Most programs have line numbers running down the left hand side, such as the one I use, PHP Designer 2005.

If you don't want to download one of these programs then use Notepad. As snlildude87 said, you can look at the status bar, but a quicker way is to press Ctrl + G and type in the line number you want.

Reply

saga
you need to have a text editor that displays line number, I used EditPlus 2, its cool since it support PHP codes which mean different colors on globals, variables and functions, anyway, what you do is to have the same exact copy of the php in your website and the editor so when errors appear, you could simply locate it in the editor and then correct the error in the editor then upload the corrected file to your server. you could either use ftp or simply the upload feature in the filemanager.

Reply

Spectre
I think we get the picture. A text editor which displays line numbers. Got it the first few times.

Anyway, daman, an easy way (in my opinion, anyway) is to use PHP to find the troublesome block of code, something to the effect of:

CODE
<pre>
<?php
$code = file('script.php');
for( $i=error_line-5;$i<(error_line+5);$i++ ) {
  $output[] = isset($code[$i]) ? $code[$i] : '';
}
echo implode("\n",$code);
?>


It's often easier to spot errors if you can crop the section of code causing the problem.

Reply

sonorama
You must be kidding dude!, I'm almost sure you must have Macromedia MX installed in your PC, right? if it is true, then just use Dreamweaver, that's it! there is no complication at all. But if you want to try something new, then use http://www.nvu.com/

Cheers!! cool.gif

Reply

saga
QUOTE(sonorama @ Sep 28 2005, 02:59 AM)
You must be kidding dude!, I'm almost sure you must have Macromedia MX installed in your PC, right? if it is true, then just use Dreamweaver, that's it! there is no complication at all. But if you want to try something new, then use http://www.nvu.com/

Cheers!! cool.gif
*



for lots of reason i am not using Wysiwyg editor. So im stuck in text based editor like notepad smile.gif

Reply

Latest Entries

snlildude87
Glad we could solve your problem.

Question answered -> thread closed.

Reply



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*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. find lines in php - 69.32 hr back. (1)
  2. "how to find lines in .php" - 82.42 hr back. (2)
Similar Topics

Keywords : lines php title


    Looking for lines, php, title, p

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for lines, php, title, p

*MORE FROM TRAP17.COM*
advertisement



How Do You Find Lines In Php? - The Title says it all!! :P



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE