omar
Sep 27 2005, 12:24 AM
| | 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. 
From, .::DAMAN::. |
Comment/Reply (w/o sign-up)
snlildude87
Sep 27 2005, 12:46 AM
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.
Comment/Reply (w/o sign-up)
shadowdemon
Sep 27 2005, 12:47 AM
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
Comment/Reply (w/o sign-up)
Tyssen
Sep 27 2005, 02:45 AM
Get yourself any decent text-based web editor - they all have line numbers.
Comment/Reply (w/o sign-up)
dogomchawi
Sep 27 2005, 03:50 AM
I would suggest that you either get Dreamweaver which costs a lot of money or TextpadWithin 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/
Comment/Reply (w/o sign-up)
rvalkass
Sep 27 2005, 05:22 AM
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.
Comment/Reply (w/o sign-up)
saga
Sep 27 2005, 01:48 PM
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.
Comment/Reply (w/o sign-up)
Spectre
Sep 27 2005, 04:48 PM
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.
Comment/Reply (w/o sign-up)
sonorama
Sep 27 2005, 06:59 PM
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!!
Comment/Reply (w/o sign-up)
saga
Sep 27 2005, 10:50 PM
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!!  for lots of reason i am not using Wysiwyg editor. So im stuck in text based editor like notepad
Comment/Reply (w/o sign-up)
snlildude87
Sep 28 2005, 03:27 AM
Glad we could solve your problem. Question answered -> thread closed.
Comment/Reply (w/o sign-up)
Recent Queries:--
how to know lines on .php - 227.25 hr back. (1)
Similar Topics
Keywords : Lines Php Title All3333
Looking for lines, php, title, p
|
|
Searching Video's for lines, php, title, p
|
advertisement
|
|