Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-17-2007, 12:32 PM Help with PHP
Junior Talker

Posts: 1
Name: Simon Loker
Trades: 0
I am new to PHP and have been asked to look at and amnd a php web site. I use dreamweaver and am experienced with html but have no idea what to do with a .php file. When I open in dreamweaver i cant do anything with it and I do not seem to be able to preview the file in firefox. I need to make some amends to the files. Any help would be appreciated.

Simon
Simonloker is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-17-2007, 01:21 PM Re: Help with PHP
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
First, PHP is a server side language.
So, to preview PHP, you need to access it through a web server which have a php interpreted installed.

Second, the principle of php (and jsp, asp, and any other server language) is to generate bits of html via calls to functions, and to include it into the original page.

So forget dreamweaver, or only use the developer view.
You cannot do anything with the designing view.

If the page don't need any database, go to apachefriends.com, download xampp, and follow their instruction to install the web server and php to your computer, and put your html file into the xampp/htdocs directory.
You will then be able to access it via "http://127.0.0.1/yourfile.php"

But don't wait for miracles, often PHP files are requiring others files (which are called includes) that provides configurations, variables, or datas to work on.

And if you need more details about what is PHP, try to look there first:
http://www.php.net/manual/en/introduction.php
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-17-2007, 01:23 PM Re: Help with PHP
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
PHP is a server-side language and has to be parsed through a server such as Apache. You can't just open the file and view it from the hard drive.
joder is offline
Reply With Quote
View Public Profile
 
Old 09-17-2007, 03:06 PM Re: Help with PHP
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by joder View Post
PHP is a server-side language and has to be parsed through a server such as Apache. You can't just open the file and view it from the hard drive.
Not only that, there might not even be anything to view. The execution of PHP code does not always result in something that can be viewed.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 09-17-2007, 03:29 PM Re: Help with PHP
Defies a Status

Posts: 1,606
Trades: 0
Do what tripy said, only download the entire site to your htdocs folder. If it needs a DB you will have to export that and import it to your local machine.

The you can change all the files you want and not break anything. Once you have it working the way you like you just load the files back to the server.

Notepad2 is an excellent tool for working with php files.

Use the windows installer version of xampp and it will be a painless install under XP pro.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 09-17-2007, 05:26 PM Re: Help with PHP
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
Make the computer you are using into a test server so that you can view the php pages through http://localhost/ ETC.
They have many php with mysql with phpmyadmin and apache packages that are together it shouldn't be to tough to install on the computer you are using so you can test / preview the php files



Quote:
Originally Posted by Simonloker View Post
I am new to PHP and have been asked to look at and amnd a php web site. I use dreamweaver and am experienced with html but have no idea what to do with a .php file. When I open in dreamweaver i cant do anything with it and I do not seem to be able to preview the file in firefox. I need to make some amends to the files. Any help would be appreciated.

Simon
__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
Old 09-17-2007, 05:41 PM Re: Help with PHP
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
To be honest i have found XAMPP to be a painless install under any windows version, the only problem i had was completely my fault because i was lazy and didnt re install and just copied the files and forgot to install it as service

Dont worry its the easiest thing in the world, it has a nice and simpel contorl panel with a tick box to install as service.. and a start and stop button for each thing (APACHE, MYSQL (and if you so wish) Filezilla and the email one )

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-17-2007, 06:26 PM Re: Help with PHP
Defies a Status

Posts: 1,606
Trades: 0
Quote:
To be honest i have found XAMPP to be a painless install under any windows version,
Have you tried it with Vista? I think there are some problems there. No first hand knowledge because I always wait for the thrid roll-out of any new MS OS.

__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 09-17-2007, 06:33 PM Re: Help with PHP
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
YURP!

im using Vista Ultimate

in fact i didnt even install it XD i just went to the software (i have 3 hdds one for the OS the other two for software and media.. ) opend the control panel ticked the install for services.. and that was IT! no problems WHAT SO EVER
working fine!

Perfect
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-17-2007, 06:36 PM Re: Help with PHP
ukfreelancer's Avatar
Experienced Talker

Posts: 30
Name: Ben Gribbin
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
To be honest i have found XAMPP to be a painless install under any windows version, the only problem i had was completely my fault because i was lazy and didnt re install and just copied the files and forgot to install it as service

Dont worry its the easiest thing in the world, it has a nice and simpel contorl panel with a tick box to install as service.. and a start and stop button for each thing (APACHE, MYSQL (and if you so wish) Filezilla and the email one )

Dan
I had 2 problems with XAMPP. One, it wont run with skype. If you have skype that auto-opens, you need to close skype, start Apache, then reboot skype, otherwise skype blocks it. On vista, you can install it in program files.

Other than that, its THE best webmasters software out there.

For PHp tuts by the thousands, check out my fave PHP (and flash, css, xhtml e.t.c) tutorial site, http://www.pixel2life.com

It rocks.
__________________

Please login or register to view this content. Registration is FREE
ukfreelancer is offline
Reply With Quote
View Public Profile
 
Old 09-17-2007, 07:09 PM Re: Help with PHP
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
One, it wont run with skype
It does, for sure. I'm on linux, so I don't know, but I believe that skype have it's own web server.
And it's obvious that 2 web servers can run at the same time on the same machine, but not on the same port.

The default port being 80, the first to clam that port will block the other.
2 solutions:

1)Deactivate the http server in skype (don't know if it's possible), or change the default used port from 80 to something else.
2)Edit httpd.conf, and change the default running port from 80 to something else, and access your apache instance with http://127.0.0.1:your_new_port
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-18-2007, 08:00 AM Re: Help with PHP
killdude69's Avatar
Average Talker

Posts: 24
Name: Brandon Miller
Trades: 0
I test it by making a password protected subdomain and upload the files with CoreFTP, then I test it. Here is a good syntax overview. It tells you all of the basics. That's how I learned. I'd be more then happy to help you. I'm no master but I can make a simple forum and more. http://www.tizag.com/phpT/ So if you want me to help you on any topic of PHP then send me a PM anytime.

Last edited by killdude69; 09-18-2007 at 09:38 PM.. Reason: Forgot to add link to tutorial.
killdude69 is offline
Reply With Quote
View Public Profile
 
Old 09-18-2007, 10:06 AM Re: Help with PHP
Novice Talker

Posts: 13
Trades: 0
you could always upload it and open it in vi
__________________

Please login or register to view this content. Registration is FREE

warlockninja is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with PHP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36257 seconds with 12 queries