Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2008, 11:45 PM
Registered User
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to a call class?????????

Helloooo. I am very new here and very new in Php..

I have something to question, maybe this is just an simple for you but difficult for me...
so.. the story goes like this...
Ex : I have my project "project.php"
     I have a class "ClsConnection"
then I want to call "ClsConnection" from my code in "project.php"

what are the codes to call "clsConnection" from project.php?
somebody....many thanks in advance.....:)
____________________________
http://michael1234539.blogspot.com
http://www.outsourceit2philippines.com



 
Old January 24th, 2008, 01:56 PM
Authorized User
 
Join Date: Sep 2007
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

You need to use the "new" keyword to create an object of the class like so:

$myclass = new ClsConnection();

http://mynameissteve.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
How to call normal "write" function inside a class jonen C++ Programming 3 May 25th, 2006 02:19 PM
Regarding Class Library (.dll) from class file manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 March 3rd, 2006 07:32 AM
How to include c# class and vb class in the .vbprj umeshayk VS.NET 2002/2003 2 January 9th, 2004 12:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.