The Little Guy Posted February 8, 2007 Share Posted February 8, 2007 I was just wondering, how you I could go and make my own library of functions. When the PHP runs, it has built in functions like strtoupper, isset, in_array, addslashes, stripslashes, etc. Those are already there for use, I don't need to call a separate file or anything. How can I make my own functions, and do the same thing? Any external tutorials would be great. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 8, 2007 Share Posted February 8, 2007 You'll always have to include the files, but yes you can define your own functions. What's wrong with our tutorials? http://www.phpfreaks.com/tutorials/26/0.php Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 8, 2007 Author Share Posted February 8, 2007 Then why can you download a library from some web site, and not have to include it in your PHP? Like CURL PEAR The PHP library can be expanded, I want to learn how to do it. Quote Link to comment Share on other sites More sharing options...
scott212 Posted February 8, 2007 Share Posted February 8, 2007 Install one of the aforementioned code libraries and look at your php.ini file. The PHP install is including them instead of each individual page. I have never done this before and really have no idea if it's a good idea to work this way. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 8, 2007 Author Share Posted February 8, 2007 Here is an article I found, and it looks like I have to write the library in C++ http://www.devnewz.com/2002/0909.html Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 8, 2007 Author Share Posted February 8, 2007 I'm reading another tutorial here: http://devzone.zend.com/node/view/id/1021 and I'm stuck on this part: The final step in this exercise will be building your extension as a dynamically loadable module. If you've copied the example above correctly, this should only take three commands run from ext/hello/: $ phpize $ ./configure --enable-hello $ make I have tried running those lines from the command line, but CMD doesn't understand them. Anyone have any Ideas? Quote Link to comment Share on other sites More sharing options...
trq Posted February 8, 2007 Share Posted February 8, 2007 looks like I have to write the library in C++ PHP is written in C, not C++. but CMD doesn't understand them. Anyone have any Ideas? They are Linux commands. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.