| | |
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 17 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; 17 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 17 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; 17 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 |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





