| | |
php classes
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Mar 2007
Posts: 154
Reputation:
Solved Threads: 0
i have a class called sqlConn.php within the same directory as hiuser.php
how do i call that class.
does not work i get
Warning: include(sql_Conn.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Warning: include() [function.include]: Failed opening 'sql_Conn.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Fatal error: Class 'sql_Conn' not found in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 12
how do i call that class.
PHP Syntax (Toggle Plain Text)
include('sql_Conn.php'); $sql = new sql_Conn;
Warning: include(sql_Conn.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Warning: include() [function.include]: Failed opening 'sql_Conn.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Fatal error: Class 'sql_Conn' not found in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 12
0
#2 18 Days Ago
•
•
•
•
i have a class called sqlConn.php within the same directory as hiuser.php
how do i call that class.
does not work i getPHP Syntax (Toggle Plain Text)
include('sql_Conn.php'); $sql = new sql_Conn;
Warning: include(sql_Conn.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Warning: include() [function.include]: Failed opening 'sql_Conn.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Fatal error: Class 'sql_Conn' not found in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 12
Last edited by leviathan185; 18 Days Ago at 6:17 pm.
@ I'm gonna live forever, or die trying.
@ A wise man once told me, in order to understand recursion, you first must understand recursion.
@ A wise man once told me, in order to understand recursion, you first must understand recursion.
0
#3 18 Days Ago
hey u mentioned ur file name to be sqlConn.php and in include statement u r calling sql_Conn.php Is it a typo or may b this is the source of ur error
You need to include the file with same name... though u can create an object for that class with the name u desire
This should work..
You need to include the file with same name... though u can create an object for that class with the name u desire
PHP Syntax (Toggle Plain Text)
include('sqlConn.php'); $sql = new sql_Conn; // assuming the name of class in that file to be sql_Conn
•
•
•
•
i have a class called sqlConn.php within the same directory as hiuser.php
how do i call that class.
does not work i getPHP Syntax (Toggle Plain Text)
include('sql_Conn.php'); $sql = new sql_Conn;
Warning: include(sql_Conn.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Warning: include() [function.include]: Failed opening 'sql_Conn.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10
Fatal error: Class 'sql_Conn' not found in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 12
Last edited by venkat0904; 18 Days Ago at 1:26 am.
Gimme reputation points if u find my post helpful.
use [code] tags wherever applicable
dont start a new thread unless u cant find the topic already on forum.
mark a thread "solved" as soon as u get a solution
use [code] tags wherever applicable
dont start a new thread unless u cant find the topic already on forum.
mark a thread "solved" as soon as u get a solution
![]() |
Similar Threads
- Searching XML documents with PHP (PHP)
- Redefining PHP Classes (PHP)
- PHP and MySQL Web Development (PHP)
- PHP Classes (PHP)
- PHP Classes (PHP)
- PHP Classes (PHP)
- question about connecting odbc to sql through php script (PHP)
Other Threads in the PHP Forum
- Previous Thread: problem with image submit button
- Next Thread: PHP-MySQL Upload Videos to Remote folder
| Thread Tools | Search this Thread |
301 apache api array autosuggest beginner binary broken cakephp checkbox class cms code compression cron curl data database date display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google href htaccess html httppost if...loop image include insert ip javascript joomla jquery key library limit link links login mail md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search searchbox server session sessions sms sorting source space sql syntax system table tutorial update upload url validator variable video volume votedown web website youtube zend





