ali_kiyani
-
Posts
61 -
Joined
-
Last visited
Never
Posts posted by ali_kiyani
-
-
Hi,
I have written this code to read from a text file line by line and print on screen. But problem is it prints all text in one line.
$handle = @fopen("myfile.txt", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); echo $buffer; } fclose($handle); }
The contents of myfile.txt are:
line 1
line 2
So it should print them in this order but rather it prints in the following way:
line1line2
What is wrong with the code?
-
Hmm..some cool solutions here...but just to clarify one point. All CVs will be stored on web server and the admin will be using a browser to print them like I said. That means I will have to first download CVs on client machine and then send them to print!?
-
Yes but is there a way around? I mean even javascript has very limited printing functionality and I guess the only way of doing this is to either use Java Applet or ActiveX control!
What's your take on this?
-
Hi,
I have a web page that displays CVs submitted by users (in DOC, PDF or RTF format). CVs are stored in a folder for e.g. user_cv
Admin can select the CVs to be printed and then click on Print button. This should send all documents to printer for printing. How do I do that in PHP?
Please check following screenshot.
Thanks
-
Are there free SMS gateways available? I will search it on Google but if you already know then let me know.
-
Hi,
How can I send any ringtone to a mobile phone using PHP? I am not looking for any conversion softwares that make ringtone compatible with mobile phone. Let's say I have the phone number, ringtone e.t.c and now I want to create a web page where I will enter that number in text field, attach ring tone and press the SEND button. How do I do that?
Thanks!
-
Cool...this one worked! thanks
But there is one problem though
In my user.php file I am printing $_GET["userid"] to see its value and this is happening
1. When I go to URL www.mywebsite.com/ali_kiyani then it prints home
2. When I go to URL www.mywebsite.com/ali_kiyani.php then it prints ali_kiyani
I think that 'home' in first point is the base directory which it shouldn't be printing and rather it should print 'ali_kiyani' like in point 2 but with out having to write .php in the end.
-
I tried Options FollowSymLinks but didn't work. I have asked my host to look into because like wildteen88 said it is possible that mod_rewrite is not allowed or there is some problem in it.
-
Ok I did as you said. Opened .htaccess file and wrote that code in it (there was already some code written in that file so I appended it with new code)
Then I created a file user.php for testing in which I wrote
if($HTTP_GET_VARS["userid"] == "1") print "ONE"; else print "TWO";
Now when I run this page http://www.mywebsite.com/user.php?userid=1 then I get the following error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@mywebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Not only that the other PHP pages in the same directory which were working previously are also showing the same error.
-
Hi
I have a web page where user registers. Each member is given its own URL based on the user name he gives during sign up. So for e.g. if some one entered "Smarty" then his web page URL will become
http://www.mywebsite.com/Smarty
On this page user's image and other details are shown. So if my website has 1000 users then 1000 URLs will be created like above.
How can I do this in PHP? Shall I use MOD_REWRITE or there is some other solution?
Thanks
-
I have found a way and that is to use ClamAV anti virus. You can use some commands it exposes in PHP to detect viruses. Haven't tried it yet though.
-
Anybody knows the answer?
-
Great thanks!
-
Hello
Can we send HTML emails using PHP's default mail method?
Thanks
-
And no database methods. Only session!
-
Hello
Is there a way of sharing sessions between PHP and ASP.Net 2.0 page if they are both in the same directory?
Let's say I have a PHP page page1.php with the following code:
<? $_SESSION['testing'] = "1"; ?> <a href="page2.aspx">Go to Next Page</a>
In page2.aspx (which is ASP.Net 2.0 page) following code is written:
Response.Write("testing")
But it doesn't print anything because sessions values between these pages is not shared. Any idea how to do that? I don't want to use query string or form methods because I want to hide the values being passed between pages.
Thanks
-
Ok I got it. The correct URL is http://www.cfdynamics.com/zipbase/
-
Thanks but the link you posted is not working. Actually the website opens but when you click on the TEXT version or ACCESS version to download...pages refreshes and nothing happens.
-
Hello
I want to give feature to my users to search something in a specific postal code with in specific miles.
Say for e.g. search cars in post code 98760 with in 30 miles radius. From where can I get this database?
Thanks
-
-
ello,
My client wants to integrate Paypal in his website that I am developing in PHP. The process is simple, users adds one or more products in shopping cart, at the end he presses the CHECKOUT button which takes him to Paypal website where he enters credit card details.
Now clients wants to know what exactly I need from him to integrate? Shall I ask him to provide his email!? that's it!? or some other paypal ID or number is also required!?
Thanks
-
Problem is solved. I didn't change anything in my code and it is working. May be host made some changes.
But strange thing is....the code I am using above is for product images....and dir permissions are set to 755 and it is uploading!!
But the same code is not working for category images (another directory).....I had to set dir permissions to 757 to make it work.
-
Hello
I developed a site for one of my client. The site was working fine on one host but when he moved to another host, file upload feature stopped working. I am using simple file upload code as below:
if(isset($_FILES['image'])) { $target_path = "../images/products/"; $target_path = $target_path . basename($_FILES['image']['name']); $upload_result = move_uploaded_file($_FILES['image']['tmp_name'], $target_path); }
I have double checked that the directory I am uploading to is writeable.
When I contacted the host they say that I need to set following TMP dir for uploads to work
/home/www/mysite.com/tmp/
How do I make changes to my code!? I mean how can I set this dir in my code!? Or do I need to do something else?!
Thanks
-
??? :-\ :'(
[SOLVED] Read file line by line
in PHP Coding Help
Posted
cool thanks!